//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension Kendra {
    // MARK: Enums

    public enum AdditionalResultAttributeValueType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case textWithHighlightsValue = "TEXT_WITH_HIGHLIGHTS_VALUE"
        public var description: String { return self.rawValue }
    }

    public enum AlfrescoEntity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case blog = "blog"
        case documentLibrary = "documentLibrary"
        case wiki = "wiki"
        public var description: String { return self.rawValue }
    }

    public enum AttributeSuggestionsMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum ConditionOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case beginsWith = "BeginsWith"
        case contains = "Contains"
        case equals = "Equals"
        case exists = "Exists"
        case greaterThan = "GreaterThan"
        case greaterThanOrEquals = "GreaterThanOrEquals"
        case lessThan = "LessThan"
        case lessThanOrEquals = "LessThanOrEquals"
        case notContains = "NotContains"
        case notEquals = "NotEquals"
        case notExists = "NotExists"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceAttachmentFieldName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case author = "AUTHOR"
        case contentType = "CONTENT_TYPE"
        case createdDate = "CREATED_DATE"
        case displayUrl = "DISPLAY_URL"
        case fileSize = "FILE_SIZE"
        case itemType = "ITEM_TYPE"
        case parentId = "PARENT_ID"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceAuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case httpBasic = "HTTP_BASIC"
        case pat = "PAT"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceBlogFieldName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case author = "AUTHOR"
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case labels = "LABELS"
        case publishDate = "PUBLISH_DATE"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluencePageFieldName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case author = "AUTHOR"
        case contentStatus = "CONTENT_STATUS"
        case createdDate = "CREATED_DATE"
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case labels = "LABELS"
        case modifiedDate = "MODIFIED_DATE"
        case parentId = "PARENT_ID"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceSpaceFieldName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case spaceKey = "SPACE_KEY"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceVersion: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cloud = "CLOUD"
        case server = "SERVER"
        public var description: String { return self.rawValue }
    }

    public enum ContentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case csv = "CSV"
        case html = "HTML"
        case json = "JSON"
        case md = "MD"
        case msExcel = "MS_EXCEL"
        case msWord = "MS_WORD"
        case pdf = "PDF"
        case plainText = "PLAIN_TEXT"
        case ppt = "PPT"
        case rtf = "RTF"
        case xml = "XML"
        case xslt = "XSLT"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceSyncJobStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aborted = "ABORTED"
        case failed = "FAILED"
        case incomplete = "INCOMPLETE"
        case stopping = "STOPPING"
        case succeeded = "SUCCEEDED"
        case syncing = "SYNCING"
        case syncingIndexing = "SYNCING_INDEXING"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case alfresco = "ALFRESCO"
        case box = "BOX"
        case confluence = "CONFLUENCE"
        case custom = "CUSTOM"
        case database = "DATABASE"
        case fsx = "FSX"
        case github = "GITHUB"
        case googledrive = "GOOGLEDRIVE"
        case jira = "JIRA"
        case onedrive = "ONEDRIVE"
        case quip = "QUIP"
        case s3 = "S3"
        case salesforce = "SALESFORCE"
        case servicenow = "SERVICENOW"
        case sharepoint = "SHAREPOINT"
        case slack = "SLACK"
        case template = "TEMPLATE"
        case webcrawler = "WEBCRAWLER"
        case workdocs = "WORKDOCS"
        public var description: String { return self.rawValue }
    }

    public enum DatabaseEngineType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case rdsAuroraMysql = "RDS_AURORA_MYSQL"
        case rdsAuroraPostgresql = "RDS_AURORA_POSTGRESQL"
        case rdsMysql = "RDS_MYSQL"
        case rdsPostgresql = "RDS_POSTGRESQL"
        public var description: String { return self.rawValue }
    }

    public enum DocumentAttributeValueType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case dateValue = "DATE_VALUE"
        case longValue = "LONG_VALUE"
        case stringListValue = "STRING_LIST_VALUE"
        case stringValue = "STRING_VALUE"
        public var description: String { return self.rawValue }
    }

    public enum DocumentStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case indexed = "INDEXED"
        case notFound = "NOT_FOUND"
        case processing = "PROCESSING"
        case updateFailed = "UPDATE_FAILED"
        case updated = "UPDATED"
        public var description: String { return self.rawValue }
    }

    public enum EndpointType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case home = "HOME"
        public var description: String { return self.rawValue }
    }

    public enum EntityType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case internalError = "InternalError"
        case invalidRequest = "InvalidRequest"
        public var description: String { return self.rawValue }
    }

    public enum ExperienceStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum FaqFileFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case csv = "CSV"
        case csvWithHeader = "CSV_WITH_HEADER"
        case json = "JSON"
        public var description: String { return self.rawValue }
    }

    public enum FaqStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum FeaturedResultsSetStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum FsxFileSystemType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case windows = "WINDOWS"
        public var description: String { return self.rawValue }
    }

    public enum HighlightType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case standard = "STANDARD"
        case thesaurusSynonym = "THESAURUS_SYNONYM"
        public var description: String { return self.rawValue }
    }

    public enum IndexEdition: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case developerEdition = "DEVELOPER_EDITION"
        case enterpriseEdition = "ENTERPRISE_EDITION"
        case genAiEnterpriseEdition = "GEN_AI_ENTERPRISE_EDITION"
        public var description: String { return self.rawValue }
    }

    public enum IndexStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case systemUpdating = "SYSTEM_UPDATING"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum Interval: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case oneMonthAgo = "ONE_MONTH_AGO"
        case oneWeekAgo = "ONE_WEEK_AGO"
        case thisMonth = "THIS_MONTH"
        case thisWeek = "THIS_WEEK"
        case twoMonthsAgo = "TWO_MONTHS_AGO"
        case twoWeeksAgo = "TWO_WEEKS_AGO"
        public var description: String { return self.rawValue }
    }

    public enum IssueSubEntity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case attachments = "ATTACHMENTS"
        case comments = "COMMENTS"
        case worklogs = "WORKLOGS"
        public var description: String { return self.rawValue }
    }

    public enum KeyLocation: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case secretManager = "SECRET_MANAGER"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum MetricType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aggQueryDocMetrics = "AGG_QUERY_DOC_METRICS"
        case docsByClickCount = "DOCS_BY_CLICK_COUNT"
        case queriesByCount = "QUERIES_BY_COUNT"
        case queriesByZeroClickRate = "QUERIES_BY_ZERO_CLICK_RATE"
        case queriesByZeroResultRate = "QUERIES_BY_ZERO_RESULT_RATE"
        case trendQueryDocMetrics = "TREND_QUERY_DOC_METRICS"
        public var description: String { return self.rawValue }
    }

    public enum MissingAttributeKeyStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case collapse = "COLLAPSE"
        case expand = "EXPAND"
        case ignore = "IGNORE"
        public var description: String { return self.rawValue }
    }

    public enum Mode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case enabled = "ENABLED"
        case learnOnly = "LEARN_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum Order: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ascending = "ASCENDING"
        case descending = "DESCENDING"
        public var description: String { return self.rawValue }
    }

    public enum Persona: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case owner = "OWNER"
        case viewer = "VIEWER"
        public var description: String { return self.rawValue }
    }

    public enum PrincipalMappingStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deleted = "DELETED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case processing = "PROCESSING"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum PrincipalType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum QueryIdentifiersEnclosingOption: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case doubleQuotes = "DOUBLE_QUOTES"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum QueryResultFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case table = "TABLE"
        case text = "TEXT"
        public var description: String { return self.rawValue }
    }

    public enum QueryResultType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case answer = "ANSWER"
        case document = "DOCUMENT"
        case questionAnswer = "QUESTION_ANSWER"
        public var description: String { return self.rawValue }
    }

    public enum QuerySuggestionsBlockListStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case activeButUpdateFailed = "ACTIVE_BUT_UPDATE_FAILED"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum QuerySuggestionsStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum ReadAccessType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allow = "ALLOW"
        case deny = "DENY"
        public var description: String { return self.rawValue }
    }

    public enum RelevanceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case notRelevant = "NOT_RELEVANT"
        case relevant = "RELEVANT"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceChatterFeedIncludeFilterType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case activeUser = "ACTIVE_USER"
        case standardUser = "STANDARD_USER"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceKnowledgeArticleState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case archived = "ARCHIVED"
        case draft = "DRAFT"
        case published = "PUBLISHED"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceStandardObjectName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `case` = "CASE"
        case account = "ACCOUNT"
        case campaign = "CAMPAIGN"
        case contact = "CONTACT"
        case contract = "CONTRACT"
        case document = "DOCUMENT"
        case group = "GROUP"
        case idea = "IDEA"
        case lead = "LEAD"
        case opportunity = "OPPORTUNITY"
        case partner = "PARTNER"
        case pricebook = "PRICEBOOK"
        case product = "PRODUCT"
        case profile = "PROFILE"
        case solution = "SOLUTION"
        case task = "TASK"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ScoreConfidence: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        case notAvailable = "NOT_AVAILABLE"
        case veryHigh = "VERY_HIGH"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNowAuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case httpBasic = "HTTP_BASIC"
        case oauth2 = "OAUTH2"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNowBuildVersionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case london = "LONDON"
        case others = "OTHERS"
        public var description: String { return self.rawValue }
    }

    public enum SharePointOnlineAuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case httpBasic = "HTTP_BASIC"
        case oauth2 = "OAUTH2"
        public var description: String { return self.rawValue }
    }

    public enum SharePointVersion: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sharepoint2013 = "SHAREPOINT_2013"
        case sharepoint2016 = "SHAREPOINT_2016"
        case sharepoint2019 = "SHAREPOINT_2019"
        case sharepointOnline = "SHAREPOINT_ONLINE"
        public var description: String { return self.rawValue }
    }

    public enum SlackEntity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case directMessage = "DIRECT_MESSAGE"
        case groupMessage = "GROUP_MESSAGE"
        case privateChannel = "PRIVATE_CHANNEL"
        case publicChannel = "PUBLIC_CHANNEL"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case asc = "ASC"
        case desc = "DESC"
        public var description: String { return self.rawValue }
    }

    public enum SuggestionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case documentAttributes = "DOCUMENT_ATTRIBUTES"
        case query = "QUERY"
        public var description: String { return self.rawValue }
    }

    public enum ThesaurusStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case activeButUpdateFailed = "ACTIVE_BUT_UPDATE_FAILED"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum UserContextPolicy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case attributeFilter = "ATTRIBUTE_FILTER"
        case userToken = "USER_TOKEN"
        public var description: String { return self.rawValue }
    }

    public enum UserGroupResolutionMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awsSso = "AWS_SSO"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum WarningCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case queryLanguageInvalidSyntax = "QUERY_LANGUAGE_INVALID_SYNTAX"
        public var description: String { return self.rawValue }
    }

    public enum WebCrawlerMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case everything = "EVERYTHING"
        case hostOnly = "HOST_ONLY"
        case subdomains = "SUBDOMAINS"
        public var description: String { return self.rawValue }
    }

    public enum `Type`: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case onPremise = "ON_PREMISE"
        case saas = "SAAS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessControlConfigurationSummary: AWSDecodableShape {
        /// The identifier of the access control configuration.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct AccessControlListConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Path to the Amazon S3 bucket that contains the ACL files.
        public let keyPath: String?

        @inlinable
        public init(keyPath: String? = nil) {
            self.keyPath = keyPath
        }

        public func validate(name: String) throws {
            try self.validate(self.keyPath, name: "keyPath", parent: name, max: 1024)
            try self.validate(self.keyPath, name: "keyPath", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case keyPath = "KeyPath"
        }
    }

    public struct AclConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query API.
        public let allowedGroupsColumnName: String

        @inlinable
        public init(allowedGroupsColumnName: String) {
            self.allowedGroupsColumnName = allowedGroupsColumnName
        }

        public func validate(name: String) throws {
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, max: 100)
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, min: 1)
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowedGroupsColumnName = "AllowedGroupsColumnName"
        }
    }

    public struct AdditionalResultAttribute: AWSDecodableShape {
        /// The key that identifies the attribute.
        public let key: String
        /// An object that contains the attribute value.
        public let value: AdditionalResultAttributeValue
        /// The data type of the Value property.
        public let valueType: AdditionalResultAttributeValueType

        @inlinable
        public init(key: String, value: AdditionalResultAttributeValue, valueType: AdditionalResultAttributeValueType) {
            self.key = key
            self.value = value
            self.valueType = valueType
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
            case valueType = "ValueType"
        }
    }

    public struct AdditionalResultAttributeValue: AWSDecodableShape {
        /// The text associated with the attribute and information about the highlight to apply to the text.
        public let textWithHighlightsValue: TextWithHighlights?

        @inlinable
        public init(textWithHighlightsValue: TextWithHighlights? = nil) {
            self.textWithHighlightsValue = textWithHighlightsValue
        }

        private enum CodingKeys: String, CodingKey {
            case textWithHighlightsValue = "TextWithHighlightsValue"
        }
    }

    public struct AlfrescoConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Alfresco blogs to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Alfresco fields. For more information, see  Mapping data source fields. The Alfresco data source field names must exist in your Alfresco custom metadata.
        public let blogFieldMappings: [DataSourceToIndexFieldMapping]?
        ///  TRUE to index comments of blogs and other content.
        public let crawlComments: Bool?
        ///  TRUE to index shared files.
        public let crawlSystemFolders: Bool?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Alfresco document libraries to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Alfresco fields. For more information, see  Mapping data source fields. The Alfresco data source field names must exist in your Alfresco custom metadata.
        public let documentLibraryFieldMappings: [DataSourceToIndexFieldMapping]?
        /// Specify whether to index document libraries, wikis, or blogs. You can specify one or more of these options.
        public let entityFilter: [AlfrescoEntity]?
        /// A list of regular expression patterns to exclude certain files in your Alfresco data source. Files that match the patterns are excluded from the index. Files that don't match the patterns are included in the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of regular expression patterns to include certain files in your Alfresco data source. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your Alfresco data source. The secret must contain a JSON structure with the following keys:   username—The user name of the Alfresco account.   password—The password of the Alfresco account.
        public let secretArn: String
        /// The identifier of the Alfresco site. For example, my-site.
        public let siteId: String
        /// The URL of the Alfresco site. For example, https://hostname:8080.
        public let siteUrl: String
        /// The path to the SSL certificate stored in an Amazon S3 bucket. You use this to connect to Alfresco if you require a secure SSL connection. You can simply generate a self-signed X509 certificate on any computer using OpenSSL. For an example of using OpenSSL to create an X509 certificate, see Create and sign an X509 certificate.
        public let sslCertificateS3Path: S3Path
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Alfresco. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Alfresco wikis to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Alfresco fields. For more information, see  Mapping data source fields. The Alfresco data source field names must exist in your Alfresco custom metadata.
        public let wikiFieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(blogFieldMappings: [DataSourceToIndexFieldMapping]? = nil, crawlComments: Bool? = nil, crawlSystemFolders: Bool? = nil, documentLibraryFieldMappings: [DataSourceToIndexFieldMapping]? = nil, entityFilter: [AlfrescoEntity]? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, secretArn: String, siteId: String, siteUrl: String, sslCertificateS3Path: S3Path, vpcConfiguration: DataSourceVpcConfiguration? = nil, wikiFieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.blogFieldMappings = blogFieldMappings
            self.crawlComments = crawlComments
            self.crawlSystemFolders = crawlSystemFolders
            self.documentLibraryFieldMappings = documentLibraryFieldMappings
            self.entityFilter = entityFilter
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
            self.siteId = siteId
            self.siteUrl = siteUrl
            self.sslCertificateS3Path = sslCertificateS3Path
            self.vpcConfiguration = vpcConfiguration
            self.wikiFieldMappings = wikiFieldMappings
        }

        public func validate(name: String) throws {
            try self.blogFieldMappings?.forEach {
                try $0.validate(name: "\(name).blogFieldMappings[]")
            }
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, max: 100)
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, min: 1)
            try self.documentLibraryFieldMappings?.forEach {
                try $0.validate(name: "\(name).documentLibraryFieldMappings[]")
            }
            try self.validate(self.documentLibraryFieldMappings, name: "documentLibraryFieldMappings", parent: name, max: 100)
            try self.validate(self.documentLibraryFieldMappings, name: "documentLibraryFieldMappings", parent: name, min: 1)
            try self.validate(self.entityFilter, name: "entityFilter", parent: name, max: 3)
            try self.validate(self.entityFilter, name: "entityFilter", parent: name, min: 1)
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.siteId, name: "siteId", parent: name, max: 128)
            try self.validate(self.siteId, name: "siteId", parent: name, min: 1)
            try self.validate(self.siteId, name: "siteId", parent: name, pattern: "^[A-Za-z0-9-]+$")
            try self.validate(self.siteUrl, name: "siteUrl", parent: name, max: 2048)
            try self.validate(self.siteUrl, name: "siteUrl", parent: name, min: 1)
            try self.validate(self.siteUrl, name: "siteUrl", parent: name, pattern: "^https:\\/\\/[a-zA-Z0-9_\\-\\.]+$")
            try self.sslCertificateS3Path.validate(name: "\(name).sslCertificateS3Path")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
            try self.wikiFieldMappings?.forEach {
                try $0.validate(name: "\(name).wikiFieldMappings[]")
            }
            try self.validate(self.wikiFieldMappings, name: "wikiFieldMappings", parent: name, max: 100)
            try self.validate(self.wikiFieldMappings, name: "wikiFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case blogFieldMappings = "BlogFieldMappings"
            case crawlComments = "CrawlComments"
            case crawlSystemFolders = "CrawlSystemFolders"
            case documentLibraryFieldMappings = "DocumentLibraryFieldMappings"
            case entityFilter = "EntityFilter"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
            case siteId = "SiteId"
            case siteUrl = "SiteUrl"
            case sslCertificateS3Path = "SslCertificateS3Path"
            case vpcConfiguration = "VpcConfiguration"
            case wikiFieldMappings = "WikiFieldMappings"
        }
    }

    public struct AssociateEntitiesToExperienceRequest: AWSEncodableShape {
        /// Lists users or groups in your IAM Identity Center identity source.
        public let entityList: [EntityConfiguration]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        @inlinable
        public init(entityList: [EntityConfiguration], id: String, indexId: String) {
            self.entityList = entityList
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityList.forEach {
                try $0.validate(name: "\(name).entityList[]")
            }
            try self.validate(self.entityList, name: "entityList", parent: name, max: 20)
            try self.validate(self.entityList, name: "entityList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityList = "EntityList"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct AssociateEntitiesToExperienceResponse: AWSDecodableShape {
        /// Lists the users or groups in your IAM Identity Center identity source that  failed to properly configure with your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        @inlinable
        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct AssociatePersonasToEntitiesRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The personas that define the specific permissions of users or groups in  your IAM Identity Center identity source. The available personas or access  roles are Owner and Viewer. For more information  on these personas, see Providing  access to your search page.
        public let personas: [EntityPersonaConfiguration]

        @inlinable
        public init(id: String, indexId: String, personas: [EntityPersonaConfiguration]) {
            self.id = id
            self.indexId = indexId
            self.personas = personas
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.personas.forEach {
                try $0.validate(name: "\(name).personas[]")
            }
            try self.validate(self.personas, name: "personas", parent: name, max: 25)
            try self.validate(self.personas, name: "personas", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case personas = "Personas"
        }
    }

    public struct AssociatePersonasToEntitiesResponse: AWSDecodableShape {
        /// Lists the users or groups in your IAM Identity Center identity source that  failed to properly configure with your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        @inlinable
        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public final class AttributeFilter: AWSEncodableShape {
        /// Performs a logical AND operation on all filters that you specify.
        public let andAllFilters: [AttributeFilter]?
        /// Returns true when a document contains all of the specified document attributes/fields. This filter is only applicable to StringListValue.
        public let containsAll: DocumentAttribute?
        /// Returns true when a document contains any of the specified document attributes/fields. This filter is only applicable to StringListValue.
        public let containsAny: DocumentAttribute?
        /// Performs an equals operation on document attributes/fields and their values.
        public let equalsTo: DocumentAttribute?
        /// Performs a greater than operation on document attributes/fields and their values. Use with the document attribute type Date or Long.
        public let greaterThan: DocumentAttribute?
        /// Performs a greater or equals than operation on document attributes/fields and their values. Use with the document attribute type Date or Long.
        public let greaterThanOrEquals: DocumentAttribute?
        /// Performs a less than operation on document attributes/fields and their values. Use with the document attribute type Date or Long.
        public let lessThan: DocumentAttribute?
        /// Performs a less than or equals operation on document attributes/fields and their values. Use with the document attribute type Date or Long.
        public let lessThanOrEquals: DocumentAttribute?
        /// Performs a logical NOT operation on all filters that you specify.
        public let notFilter: AttributeFilter?
        /// Performs a logical OR operation on all filters that you specify.
        public let orAllFilters: [AttributeFilter]?

        @inlinable
        public init(andAllFilters: [AttributeFilter]? = nil, containsAll: DocumentAttribute? = nil, containsAny: DocumentAttribute? = nil, equalsTo: DocumentAttribute? = nil, greaterThan: DocumentAttribute? = nil, greaterThanOrEquals: DocumentAttribute? = nil, lessThan: DocumentAttribute? = nil, lessThanOrEquals: DocumentAttribute? = nil, notFilter: AttributeFilter? = nil, orAllFilters: [AttributeFilter]? = nil) {
            self.andAllFilters = andAllFilters
            self.containsAll = containsAll
            self.containsAny = containsAny
            self.equalsTo = equalsTo
            self.greaterThan = greaterThan
            self.greaterThanOrEquals = greaterThanOrEquals
            self.lessThan = lessThan
            self.lessThanOrEquals = lessThanOrEquals
            self.notFilter = notFilter
            self.orAllFilters = orAllFilters
        }

        public func validate(name: String) throws {
            try self.andAllFilters?.forEach {
                try $0.validate(name: "\(name).andAllFilters[]")
            }
            try self.containsAll?.validate(name: "\(name).containsAll")
            try self.containsAny?.validate(name: "\(name).containsAny")
            try self.equalsTo?.validate(name: "\(name).equalsTo")
            try self.greaterThan?.validate(name: "\(name).greaterThan")
            try self.greaterThanOrEquals?.validate(name: "\(name).greaterThanOrEquals")
            try self.lessThan?.validate(name: "\(name).lessThan")
            try self.lessThanOrEquals?.validate(name: "\(name).lessThanOrEquals")
            try self.notFilter?.validate(name: "\(name).notFilter")
            try self.orAllFilters?.forEach {
                try $0.validate(name: "\(name).orAllFilters[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case andAllFilters = "AndAllFilters"
            case containsAll = "ContainsAll"
            case containsAny = "ContainsAny"
            case equalsTo = "EqualsTo"
            case greaterThan = "GreaterThan"
            case greaterThanOrEquals = "GreaterThanOrEquals"
            case lessThan = "LessThan"
            case lessThanOrEquals = "LessThanOrEquals"
            case notFilter = "NotFilter"
            case orAllFilters = "OrAllFilters"
        }
    }

    public struct AttributeSuggestionsDescribeConfig: AWSDecodableShape {
        /// The mode is set to either ACTIVE or INACTIVE. If the Mode  for query history is set to ENABLED when calling UpdateQuerySuggestionsConfig  and AttributeSuggestionsMode to use fields/attributes is set to ACTIVE,  and you haven't set your SuggestionTypes preference to DOCUMENT_ATTRIBUTES,  then Amazon Kendra uses the query history.
        public let attributeSuggestionsMode: AttributeSuggestionsMode?
        /// The list of fields/attributes that you want to set as suggestible for query suggestions.
        public let suggestableConfigList: [SuggestableConfig]?

        @inlinable
        public init(attributeSuggestionsMode: AttributeSuggestionsMode? = nil, suggestableConfigList: [SuggestableConfig]? = nil) {
            self.attributeSuggestionsMode = attributeSuggestionsMode
            self.suggestableConfigList = suggestableConfigList
        }

        private enum CodingKeys: String, CodingKey {
            case attributeSuggestionsMode = "AttributeSuggestionsMode"
            case suggestableConfigList = "SuggestableConfigList"
        }
    }

    public struct AttributeSuggestionsGetConfig: AWSEncodableShape {
        /// The list of additional document field/attribute keys or field names to include in the  response. You can use additional fields to provide extra information in the response.  Additional fields are not used to based suggestions on.
        public let additionalResponseAttributes: [String]?
        /// Filters the search results based on document fields/attributes.
        public let attributeFilter: AttributeFilter?
        /// The list of document field/attribute keys or field names to use for query suggestions.  If the content within any of the fields match what your user starts typing as their query,  then the field content is returned as a query suggestion.
        public let suggestionAttributes: [String]?
        /// Applies user context filtering so that only users who are given access to certain  documents see these document in their search results.
        public let userContext: UserContext?

        @inlinable
        public init(additionalResponseAttributes: [String]? = nil, attributeFilter: AttributeFilter? = nil, suggestionAttributes: [String]? = nil, userContext: UserContext? = nil) {
            self.additionalResponseAttributes = additionalResponseAttributes
            self.attributeFilter = attributeFilter
            self.suggestionAttributes = suggestionAttributes
            self.userContext = userContext
        }

        public func validate(name: String) throws {
            try self.additionalResponseAttributes?.forEach {
                try validate($0, name: "additionalResponseAttributes[]", parent: name, max: 200)
                try validate($0, name: "additionalResponseAttributes[]", parent: name, min: 1)
                try validate($0, name: "additionalResponseAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.additionalResponseAttributes, name: "additionalResponseAttributes", parent: name, max: 100)
            try self.validate(self.additionalResponseAttributes, name: "additionalResponseAttributes", parent: name, min: 1)
            try self.attributeFilter?.validate(name: "\(name).attributeFilter")
            try self.suggestionAttributes?.forEach {
                try validate($0, name: "suggestionAttributes[]", parent: name, max: 200)
                try validate($0, name: "suggestionAttributes[]", parent: name, min: 1)
                try validate($0, name: "suggestionAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.suggestionAttributes, name: "suggestionAttributes", parent: name, max: 100)
            try self.validate(self.suggestionAttributes, name: "suggestionAttributes", parent: name, min: 1)
            try self.userContext?.validate(name: "\(name).userContext")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalResponseAttributes = "AdditionalResponseAttributes"
            case attributeFilter = "AttributeFilter"
            case suggestionAttributes = "SuggestionAttributes"
            case userContext = "UserContext"
        }
    }

    public struct AttributeSuggestionsUpdateConfig: AWSEncodableShape {
        /// You can set the mode to ACTIVE or INACTIVE. You must also set  SuggestionTypes as either QUERY or DOCUMENT_ATTRIBUTES  and then call GetQuerySuggestions. If Mode to use query history is set to  ENABLED when calling UpdateQuerySuggestionsConfig and AttributeSuggestionsMode to use  fields/attributes is set to ACTIVE, and you haven't set your  SuggestionTypes preference to DOCUMENT_ATTRIBUTES, then  Amazon Kendra uses the query history.
        public let attributeSuggestionsMode: AttributeSuggestionsMode?
        /// The list of fields/attributes that you want to set as suggestible for query  suggestions.
        public let suggestableConfigList: [SuggestableConfig]?

        @inlinable
        public init(attributeSuggestionsMode: AttributeSuggestionsMode? = nil, suggestableConfigList: [SuggestableConfig]? = nil) {
            self.attributeSuggestionsMode = attributeSuggestionsMode
            self.suggestableConfigList = suggestableConfigList
        }

        public func validate(name: String) throws {
            try self.suggestableConfigList?.forEach {
                try $0.validate(name: "\(name).suggestableConfigList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributeSuggestionsMode = "AttributeSuggestionsMode"
            case suggestableConfigList = "SuggestableConfigList"
        }
    }

    public struct AuthenticationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of configuration information that's required to connect to and crawl a website host using basic authentication credentials. The list includes the name and port number of the website host.
        public let basicAuthentication: [BasicAuthenticationConfiguration]?

        @inlinable
        public init(basicAuthentication: [BasicAuthenticationConfiguration]? = nil) {
            self.basicAuthentication = basicAuthentication
        }

        public func validate(name: String) throws {
            try self.basicAuthentication?.forEach {
                try $0.validate(name: "\(name).basicAuthentication[]")
            }
            try self.validate(self.basicAuthentication, name: "basicAuthentication", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case basicAuthentication = "BasicAuthentication"
        }
    }

    public struct BasicAuthenticationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret. You create a  secret to store your credentials in Secrets Manager  You use a secret if basic authentication credentials are required to connect to a website. The secret stores your credentials of user name and password.
        public let credentials: String
        /// The name of the website host you want to connect to using authentication credentials. For example, the host name of https://a.example.com/page1.html is "a.example.com".
        public let host: String
        /// The port number of the website host you want to connect to using authentication credentials. For example, the port for https://a.example.com/page1.html is 443, the standard port for HTTPS.
        public let port: Int

        @inlinable
        public init(credentials: String, host: String, port: Int) {
            self.credentials = credentials
            self.host = host
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.credentials, name: "credentials", parent: name, max: 1284)
            try self.validate(self.credentials, name: "credentials", parent: name, min: 1)
            try self.validate(self.credentials, name: "credentials", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.host, name: "host", parent: name, max: 253)
            try self.validate(self.host, name: "host", parent: name, min: 1)
            try self.validate(self.host, name: "host", parent: name, pattern: "^([^\\s]*)$")
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case host = "Host"
            case port = "Port"
        }
    }

    public struct BatchDeleteDocumentRequest: AWSEncodableShape {
        public let dataSourceSyncJobMetricTarget: DataSourceSyncJobMetricTarget?
        /// One or more identifiers for documents to delete from the index.
        public let documentIdList: [String]
        /// The identifier of the index that contains the documents to delete.
        public let indexId: String

        @inlinable
        public init(dataSourceSyncJobMetricTarget: DataSourceSyncJobMetricTarget? = nil, documentIdList: [String], indexId: String) {
            self.dataSourceSyncJobMetricTarget = dataSourceSyncJobMetricTarget
            self.documentIdList = documentIdList
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.dataSourceSyncJobMetricTarget?.validate(name: "\(name).dataSourceSyncJobMetricTarget")
            try self.documentIdList.forEach {
                try validate($0, name: "documentIdList[]", parent: name, max: 2048)
                try validate($0, name: "documentIdList[]", parent: name, min: 1)
            }
            try self.validate(self.documentIdList, name: "documentIdList", parent: name, max: 10)
            try self.validate(self.documentIdList, name: "documentIdList", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceSyncJobMetricTarget = "DataSourceSyncJobMetricTarget"
            case documentIdList = "DocumentIdList"
            case indexId = "IndexId"
        }
    }

    public struct BatchDeleteDocumentResponse: AWSDecodableShape {
        /// A list of documents that could not be removed from the index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
        public let failedDocuments: [BatchDeleteDocumentResponseFailedDocument]?

        @inlinable
        public init(failedDocuments: [BatchDeleteDocumentResponseFailedDocument]? = nil) {
            self.failedDocuments = failedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case failedDocuments = "FailedDocuments"
        }
    }

    public struct BatchDeleteDocumentResponseFailedDocument: AWSDecodableShape {
        ///  The identifier of the data source connector that the document belongs to.
        public let dataSourceId: String?
        /// The error code for why the document couldn't be removed from the index.
        public let errorCode: ErrorCode?
        /// An explanation for why the document couldn't be removed from the index.
        public let errorMessage: String?
        /// The identifier of the document that couldn't be removed from the index.
        public let id: String?

        @inlinable
        public init(dataSourceId: String? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil, id: String? = nil) {
            self.dataSourceId = dataSourceId
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case id = "Id"
        }
    }

    public struct BatchDeleteFeaturedResultsSetError: AWSDecodableShape {
        /// The error code for why the set of featured results couldn't be removed  from the index.
        public let errorCode: ErrorCode
        /// An explanation for why the set of featured results couldn't be removed  from the index.
        public let errorMessage: String
        /// The identifier of the set of featured results that couldn't be removed  from the index.
        public let id: String

        @inlinable
        public init(errorCode: ErrorCode, errorMessage: String, id: String) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case id = "Id"
        }
    }

    public struct BatchDeleteFeaturedResultsSetRequest: AWSEncodableShape {
        /// The identifiers of the featured results sets that you want to delete.
        public let featuredResultsSetIds: [String]
        /// The identifier of the index used for featuring results.
        public let indexId: String

        @inlinable
        public init(featuredResultsSetIds: [String], indexId: String) {
            self.featuredResultsSetIds = featuredResultsSetIds
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.featuredResultsSetIds.forEach {
                try validate($0, name: "featuredResultsSetIds[]", parent: name, max: 36)
                try validate($0, name: "featuredResultsSetIds[]", parent: name, min: 36)
                try validate($0, name: "featuredResultsSetIds[]", parent: name, pattern: "^[a-zA-Z-0-9]*$")
            }
            try self.validate(self.featuredResultsSetIds, name: "featuredResultsSetIds", parent: name, max: 50)
            try self.validate(self.featuredResultsSetIds, name: "featuredResultsSetIds", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case featuredResultsSetIds = "FeaturedResultsSetIds"
            case indexId = "IndexId"
        }
    }

    public struct BatchDeleteFeaturedResultsSetResponse: AWSDecodableShape {
        /// The list of errors for the featured results set IDs, explaining why they  couldn't be removed from the index.
        public let errors: [BatchDeleteFeaturedResultsSetError]

        @inlinable
        public init(errors: [BatchDeleteFeaturedResultsSetError]) {
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case errors = "Errors"
        }
    }

    public struct BatchGetDocumentStatusRequest: AWSEncodableShape {
        /// A list of DocumentInfo objects that identify the documents for which to get the status. You identify the documents by their document ID and optional attributes.
        public let documentInfoList: [DocumentInfo]
        /// The identifier of the index to add documents to. The index ID is returned by the CreateIndex API.
        public let indexId: String

        @inlinable
        public init(documentInfoList: [DocumentInfo], indexId: String) {
            self.documentInfoList = documentInfoList
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.documentInfoList.forEach {
                try $0.validate(name: "\(name).documentInfoList[]")
            }
            try self.validate(self.documentInfoList, name: "documentInfoList", parent: name, max: 10)
            try self.validate(self.documentInfoList, name: "documentInfoList", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentInfoList = "DocumentInfoList"
            case indexId = "IndexId"
        }
    }

    public struct BatchGetDocumentStatusResponse: AWSDecodableShape {
        /// The status of documents. The status indicates if the document is waiting to be indexed, is in the process of indexing, has completed indexing, or failed indexing. If a document failed indexing, the status provides the reason why.
        public let documentStatusList: [Status]?
        /// A list of documents that Amazon Kendra couldn't get the status for. The list includes the ID of the document and the reason that the status couldn't be found.
        public let errors: [BatchGetDocumentStatusResponseError]?

        @inlinable
        public init(documentStatusList: [Status]? = nil, errors: [BatchGetDocumentStatusResponseError]? = nil) {
            self.documentStatusList = documentStatusList
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case documentStatusList = "DocumentStatusList"
            case errors = "Errors"
        }
    }

    public struct BatchGetDocumentStatusResponseError: AWSDecodableShape {
        ///  The identifier of the data source connector that the failed document belongs to.
        public let dataSourceId: String?
        /// The identifier of the document whose status could not be retrieved.
        public let documentId: String?
        /// Indicates the source of the error.
        public let errorCode: ErrorCode?
        /// States that the API could not get the status of a document. This could be because the request is not valid or there is a system error.
        public let errorMessage: String?

        @inlinable
        public init(dataSourceId: String? = nil, documentId: String? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil) {
            self.dataSourceId = dataSourceId
            self.documentId = documentId
            self.errorCode = errorCode
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case documentId = "DocumentId"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct BatchPutDocumentRequest: AWSEncodableShape {
        /// Configuration information for altering your document metadata and content during the document ingestion process when you use the BatchPutDocument API. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// One or more documents to add to the index. Documents have the following file size limits.   50 MB total size for any file   5 MB extracted text for any file   For more information, see Quotas.
        public let documents: [Document]
        /// The identifier of the index to add the documents to. You need to create the index first using the CreateIndex API.
        public let indexId: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket. For more information, see IAM access roles for Amazon Kendra.
        public let roleArn: String?

        @inlinable
        public init(customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, documents: [Document], indexId: String, roleArn: String? = nil) {
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.documents = documents
            self.indexId = indexId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.documents.forEach {
                try $0.validate(name: "\(name).documents[]")
            }
            try self.validate(self.documents, name: "documents", parent: name, max: 10)
            try self.validate(self.documents, name: "documents", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case documents = "Documents"
            case indexId = "IndexId"
            case roleArn = "RoleArn"
        }
    }

    public struct BatchPutDocumentResponse: AWSDecodableShape {
        /// A list of documents that were not added to the index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index. If there was an error adding a document to an index the error is reported in your Amazon Web Services CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch logs.
        public let failedDocuments: [BatchPutDocumentResponseFailedDocument]?

        @inlinable
        public init(failedDocuments: [BatchPutDocumentResponseFailedDocument]? = nil) {
            self.failedDocuments = failedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case failedDocuments = "FailedDocuments"
        }
    }

    public struct BatchPutDocumentResponseFailedDocument: AWSDecodableShape {
        ///  The identifier of the data source connector that the failed document belongs to.
        public let dataSourceId: String?
        /// The type of error that caused the document to fail to be indexed.
        public let errorCode: ErrorCode?
        /// A description of the reason why the document could not be indexed.
        public let errorMessage: String?
        /// The identifier of the document.
        public let id: String?

        @inlinable
        public init(dataSourceId: String? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil, id: String? = nil) {
            self.dataSourceId = dataSourceId
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case id = "Id"
        }
    }

    public struct BoxConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of DataSourceToIndexFieldMapping objects that map attributes  or field names of Box comments to Amazon Kendra index field names. To create  custom fields, use the UpdateIndex API before you map to Box fields.  For more information, see Mapping data source fields.  The Box field names must exist in your Box custom metadata.
        public let commentFieldMappings: [DataSourceToIndexFieldMapping]?
        ///  TRUE to index comments.
        public let crawlComments: Bool?
        ///  TRUE to index the contents of tasks.
        public let crawlTasks: Bool?
        ///  TRUE to index web links.
        public let crawlWebLinks: Bool?
        /// The identifier of the Box Enterprise platform. You can find the enterprise  ID in the Box Developer Console settings or when you create an app in Box and  download your authentication credentials. For example, 801234567.
        public let enterpriseId: String
        /// A list of regular expression patterns to exclude certain files and folders from  your Box platform. Files and folders that match the patterns are excluded from the  index.Files and folders that don't match the patterns are included in the index.  If a file or folder matches both an inclusion and exclusion pattern, the exclusion  pattern takes precedence and the file or folder isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or  field names of Box files to Amazon Kendra index field names. To create custom  fields, use the UpdateIndex API before you map to Box fields. For more  information, see Mapping data source fields.  The Box field names must exist in your Box custom metadata.
        public let fileFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain files and folders in your  Box platform. Files and folders that match the patterns are included in the index.  Files and folders that don't match the patterns are excluded from the index. If a  file or folder matches both an inclusion and exclusion pattern, the exclusion pattern  takes precedence and the file or folder isn't included in the index.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains  the key-value pairs required to connect to your Box platform. The secret must  contain a JSON structure with the following keys:   clientID—The identifier of the client OAuth 2.0 authentication application created in Box.   clientSecret—A set of characters known only to the OAuth 2.0 authentication application created in Box.   publicKeyId—The identifier of the public key contained within an identity certificate.   privateKey—A set of characters that make up an encryption key.   passphrase—A set of characters that act like a password.   You create an application in Box to generate the keys or credentials required  for the secret. For more information, see Using a Box data source.
        public let secretArn: String
        /// A list of DataSourceToIndexFieldMapping objects that map attributes  or field names of Box tasks to Amazon Kendra index field names. To create  custom fields, use the UpdateIndex API before you map to Box fields.  For more information, see Mapping data source fields.  The Box field names must exist in your Box custom metadata.
        public let taskFieldMappings: [DataSourceToIndexFieldMapping]?
        ///  TRUE to use the Slack change log to determine which documents require updating in the index. Depending on the data source change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents.
        public let useChangeLog: Bool?
        /// Configuration information for an Amazon VPC to connect to your Box. For  more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes  or field names of Box web links to Amazon Kendra index field names. To create  custom fields, use the UpdateIndex API before you map to Box fields.  For more information, see Mapping data source fields.  The Box field names must exist in your Box custom metadata.
        public let webLinkFieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(commentFieldMappings: [DataSourceToIndexFieldMapping]? = nil, crawlComments: Bool? = nil, crawlTasks: Bool? = nil, crawlWebLinks: Bool? = nil, enterpriseId: String, exclusionPatterns: [String]? = nil, fileFieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, secretArn: String, taskFieldMappings: [DataSourceToIndexFieldMapping]? = nil, useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil, webLinkFieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.commentFieldMappings = commentFieldMappings
            self.crawlComments = crawlComments
            self.crawlTasks = crawlTasks
            self.crawlWebLinks = crawlWebLinks
            self.enterpriseId = enterpriseId
            self.exclusionPatterns = exclusionPatterns
            self.fileFieldMappings = fileFieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
            self.taskFieldMappings = taskFieldMappings
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
            self.webLinkFieldMappings = webLinkFieldMappings
        }

        public func validate(name: String) throws {
            try self.commentFieldMappings?.forEach {
                try $0.validate(name: "\(name).commentFieldMappings[]")
            }
            try self.validate(self.commentFieldMappings, name: "commentFieldMappings", parent: name, max: 100)
            try self.validate(self.commentFieldMappings, name: "commentFieldMappings", parent: name, min: 1)
            try self.validate(self.enterpriseId, name: "enterpriseId", parent: name, max: 64)
            try self.validate(self.enterpriseId, name: "enterpriseId", parent: name, min: 1)
            try self.validate(self.enterpriseId, name: "enterpriseId", parent: name, pattern: "^[A-Z0-9]*$")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fileFieldMappings?.forEach {
                try $0.validate(name: "\(name).fileFieldMappings[]")
            }
            try self.validate(self.fileFieldMappings, name: "fileFieldMappings", parent: name, max: 100)
            try self.validate(self.fileFieldMappings, name: "fileFieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.taskFieldMappings?.forEach {
                try $0.validate(name: "\(name).taskFieldMappings[]")
            }
            try self.validate(self.taskFieldMappings, name: "taskFieldMappings", parent: name, max: 100)
            try self.validate(self.taskFieldMappings, name: "taskFieldMappings", parent: name, min: 1)
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
            try self.webLinkFieldMappings?.forEach {
                try $0.validate(name: "\(name).webLinkFieldMappings[]")
            }
            try self.validate(self.webLinkFieldMappings, name: "webLinkFieldMappings", parent: name, max: 100)
            try self.validate(self.webLinkFieldMappings, name: "webLinkFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case commentFieldMappings = "CommentFieldMappings"
            case crawlComments = "CrawlComments"
            case crawlTasks = "CrawlTasks"
            case crawlWebLinks = "CrawlWebLinks"
            case enterpriseId = "EnterpriseId"
            case exclusionPatterns = "ExclusionPatterns"
            case fileFieldMappings = "FileFieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
            case taskFieldMappings = "TaskFieldMappings"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
            case webLinkFieldMappings = "WebLinkFieldMappings"
        }
    }

    public struct CapacityUnitsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The amount of extra query capacity for an index and GetQuerySuggestions capacity. A single extra capacity unit for an index provides 0.1 queries per second or approximately 8,000 queries per day. You can add up to 100 extra capacity units.  GetQuerySuggestions capacity is five times the provisioned query capacity for an index, or the base capacity of 2.5 calls per second, whichever is higher. For example, the base capacity for an index is 0.1 queries per second, and GetQuerySuggestions capacity has a base of 2.5 calls per second. If you add another 0.1 queries per second to total 0.2 queries per second for an index, the GetQuerySuggestions capacity is 2.5 calls per second (higher than five times 0.2 queries per second).
        public let queryCapacityUnits: Int
        /// The amount of extra storage capacity for an index. A single capacity unit provides 30 GB of storage space or 100,000 documents, whichever is reached first. You can add up to 100 extra capacity units.
        public let storageCapacityUnits: Int

        @inlinable
        public init(queryCapacityUnits: Int, storageCapacityUnits: Int) {
            self.queryCapacityUnits = queryCapacityUnits
            self.storageCapacityUnits = storageCapacityUnits
        }

        public func validate(name: String) throws {
            try self.validate(self.queryCapacityUnits, name: "queryCapacityUnits", parent: name, min: 0)
            try self.validate(self.storageCapacityUnits, name: "storageCapacityUnits", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case queryCapacityUnits = "QueryCapacityUnits"
            case storageCapacityUnits = "StorageCapacityUnits"
        }
    }

    public struct ClearQuerySuggestionsRequest: AWSEncodableShape {
        /// The identifier of the index you want to clear query suggestions from.
        public let indexId: String

        @inlinable
        public init(indexId: String) {
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
        }
    }

    public struct ClickFeedback: AWSEncodableShape {
        /// The Unix timestamp when the result was clicked.
        public let clickTime: Date
        /// The identifier of the search result that was clicked.
        public let resultId: String

        @inlinable
        public init(clickTime: Date, resultId: String) {
            self.clickTime = clickTime
            self.resultId = resultId
        }

        public func validate(name: String) throws {
            try self.validate(self.resultId, name: "resultId", parent: name, max: 73)
            try self.validate(self.resultId, name: "resultId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clickTime = "ClickTime"
            case resultId = "ResultId"
        }
    }

    public struct CollapseConfiguration: AWSEncodableShape {
        /// The document attribute used to group search results. You can use any attribute that has the Sortable flag set to true. You can also sort by any of the following built-in attributes:"_category","_created_at", "_last_updated_at", "_version", "_view_count".
        public let documentAttributeKey: String
        /// Specifies whether to expand the collapsed results.
        public let expand: Bool?
        /// Provides configuration information to customize expansion options for a collapsed group.
        public let expandConfiguration: ExpandConfiguration?
        /// Specifies the behavior for documents without a value for the collapse attribute. Amazon Kendra offers three customization options:   Choose to COLLAPSE all documents with null or missing values in one group. This is the default configuration.   Choose to IGNORE documents with null or missing values. Ignored documents will not appear in query results.   Choose to EXPAND each document with a null or missing value into a group of its own.
        public let missingAttributeKeyStrategy: MissingAttributeKeyStrategy?
        /// A prioritized list of document attributes/fields that determine the primary document among those in a collapsed group.
        public let sortingConfigurations: [SortingConfiguration]?

        @inlinable
        public init(documentAttributeKey: String, expand: Bool? = nil, expandConfiguration: ExpandConfiguration? = nil, missingAttributeKeyStrategy: MissingAttributeKeyStrategy? = nil, sortingConfigurations: [SortingConfiguration]? = nil) {
            self.documentAttributeKey = documentAttributeKey
            self.expand = expand
            self.expandConfiguration = expandConfiguration
            self.missingAttributeKeyStrategy = missingAttributeKeyStrategy
            self.sortingConfigurations = sortingConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, max: 200)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, min: 1)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.sortingConfigurations?.forEach {
                try $0.validate(name: "\(name).sortingConfigurations[]")
            }
            try self.validate(self.sortingConfigurations, name: "sortingConfigurations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case expand = "Expand"
            case expandConfiguration = "ExpandConfiguration"
            case missingAttributeKeyStrategy = "MissingAttributeKeyStrategy"
            case sortingConfigurations = "SortingConfigurations"
        }
    }

    public struct CollapsedResultDetail: AWSDecodableShape {
        /// The value of the document attribute that results are collapsed on.
        public let documentAttribute: DocumentAttribute
        /// A list of results in the collapsed group.
        public let expandedResults: [ExpandedResultItem]?

        @inlinable
        public init(documentAttribute: DocumentAttribute, expandedResults: [ExpandedResultItem]? = nil) {
            self.documentAttribute = documentAttribute
            self.expandedResults = expandedResults
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttribute = "DocumentAttribute"
            case expandedResults = "ExpandedResults"
        }
    }

    public struct ColumnConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// One to five columns that indicate when a document in the database has changed.
        public let changeDetectingColumns: [String]
        /// The column that contains the contents of the document.
        public let documentDataColumnName: String
        /// The column that provides the document's identifier.
        public let documentIdColumnName: String
        /// The column that contains the title of the document.
        public let documentTitleColumnName: String?
        /// An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex API.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(changeDetectingColumns: [String], documentDataColumnName: String, documentIdColumnName: String, documentTitleColumnName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.changeDetectingColumns = changeDetectingColumns
            self.documentDataColumnName = documentDataColumnName
            self.documentIdColumnName = documentIdColumnName
            self.documentTitleColumnName = documentTitleColumnName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.changeDetectingColumns.forEach {
                try validate($0, name: "changeDetectingColumns[]", parent: name, max: 100)
                try validate($0, name: "changeDetectingColumns[]", parent: name, min: 1)
                try validate($0, name: "changeDetectingColumns[]", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            }
            try self.validate(self.changeDetectingColumns, name: "changeDetectingColumns", parent: name, max: 5)
            try self.validate(self.changeDetectingColumns, name: "changeDetectingColumns", parent: name, min: 1)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, max: 100)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, min: 1)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, max: 100)
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, min: 1)
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, max: 100)
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, min: 1)
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case changeDetectingColumns = "ChangeDetectingColumns"
            case documentDataColumnName = "DocumentDataColumnName"
            case documentIdColumnName = "DocumentIdColumnName"
            case documentTitleColumnName = "DocumentTitleColumnName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct ConflictingItem: AWSDecodableShape {
        /// The text of the conflicting query.
        public let queryText: String?
        /// The identifier of the set of featured results that the conflicting  query belongs to.
        public let setId: String?
        /// The name for the set of featured results that the conflicting query  belongs to.
        public let setName: String?

        @inlinable
        public init(queryText: String? = nil, setId: String? = nil, setName: String? = nil) {
            self.queryText = queryText
            self.setId = setId
            self.setName = setName
        }

        private enum CodingKeys: String, CodingKey {
            case queryText = "QueryText"
            case setId = "SetId"
            case setName = "SetName"
        }
    }

    public struct ConfluenceAttachmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Maps attributes or field names of Confluence attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Confluence fields. For more information, see Mapping data source fields. The Confluence data source field names must exist in your Confluence custom metadata. If you specify the AttachentFieldMappings parameter, you must specify at least one field mapping.
        public let attachmentFieldMappings: [ConfluenceAttachmentToIndexFieldMapping]?
        ///  TRUE to index attachments of pages and blogs in Confluence.
        public let crawlAttachments: Bool?

        @inlinable
        public init(attachmentFieldMappings: [ConfluenceAttachmentToIndexFieldMapping]? = nil, crawlAttachments: Bool? = nil) {
            self.attachmentFieldMappings = attachmentFieldMappings
            self.crawlAttachments = crawlAttachments
        }

        public func validate(name: String) throws {
            try self.attachmentFieldMappings?.forEach {
                try $0.validate(name: "\(name).attachmentFieldMappings[]")
            }
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, max: 11)
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentFieldMappings = "AttachmentFieldMappings"
            case crawlAttachments = "CrawlAttachments"
        }
    }

    public struct ConfluenceAttachmentToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.  You must first create the index field using the UpdateIndex API.
        public let dataSourceFieldName: ConfluenceAttachmentFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        @inlinable
        public init(dataSourceFieldName: ConfluenceAttachmentFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceBlogConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Maps attributes or field names of Confluence blogs to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Confluence fields. For more information, see Mapping data source fields. The Confluence data source field names must exist in your Confluence custom metadata. If you specify the BlogFieldMappings parameter, you must specify at least one field mapping.
        public let blogFieldMappings: [ConfluenceBlogToIndexFieldMapping]?

        @inlinable
        public init(blogFieldMappings: [ConfluenceBlogToIndexFieldMapping]? = nil) {
            self.blogFieldMappings = blogFieldMappings
        }

        public func validate(name: String) throws {
            try self.blogFieldMappings?.forEach {
                try $0.validate(name: "\(name).blogFieldMappings[]")
            }
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, max: 9)
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case blogFieldMappings = "BlogFieldMappings"
        }
    }

    public struct ConfluenceBlogToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluenceBlogFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        @inlinable
        public init(dataSourceFieldName: ConfluenceBlogFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information for indexing attachments to Confluence blogs and pages.
        public let attachmentConfiguration: ConfluenceAttachmentConfiguration?
        /// Whether you want to connect to Confluence using basic authentication of user name and password, or a personal access token. You can use a personal access token for Confluence Server.
        public let authenticationType: ConfluenceAuthenticationType?
        /// Configuration information for indexing Confluence blogs.
        public let blogConfiguration: ConfluenceBlogConfiguration?
        /// A list of regular expression patterns to exclude certain blog posts, pages, spaces, or attachments in your Confluence. Content that matches the patterns are excluded from the index. Content that doesn't match the patterns is included in the index. If content matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the content isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of regular expression patterns to include certain blog posts, pages, spaces, or attachments in your Confluence. Content that matches the patterns are included in the index. Content that doesn't match the patterns is excluded from the index. If content matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the content isn't included in the index.
        public let inclusionPatterns: [String]?
        /// Configuration information for indexing Confluence pages.
        public let pageConfiguration: ConfluencePageConfiguration?
        /// Configuration information to connect to your Confluence URL instance via a web proxy. You can use this option for Confluence Server. You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic authentication of user name and password. To store web proxy credentials, you use a secret in Secrets Manager. It is recommended that you follow best security practices when configuring your web proxy. This includes setting up throttling, setting up logging and monitoring, and applying security patches on a regular basis. If you use your web proxy with multiple data sources, sync jobs that occur at the same time could strain the load on your proxy. It is recommended you prepare your proxy beforehand for any security and load requirements.
        public let proxyConfiguration: ProxyConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password required to connect to the Confluence instance. If you use Confluence Cloud, you use a generated API token as the password. You can also provide authentication credentials in the form of a personal access token. For more information, see Using a Confluence data source.
        public let secretArn: String
        /// The URL of your Confluence instance. Use the full URL of the server. For example, https://server.example.com:port/. You can also use an IP address, for example, https://192.168.1.113/.
        public let serverUrl: String
        /// Configuration information for indexing Confluence spaces.
        public let spaceConfiguration: ConfluenceSpaceConfiguration?
        /// The version or the type of Confluence installation to connect to.
        public let version: ConfluenceVersion
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Confluence. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(attachmentConfiguration: ConfluenceAttachmentConfiguration? = nil, authenticationType: ConfluenceAuthenticationType? = nil, blogConfiguration: ConfluenceBlogConfiguration? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, pageConfiguration: ConfluencePageConfiguration? = nil, proxyConfiguration: ProxyConfiguration? = nil, secretArn: String, serverUrl: String, spaceConfiguration: ConfluenceSpaceConfiguration? = nil, version: ConfluenceVersion, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.attachmentConfiguration = attachmentConfiguration
            self.authenticationType = authenticationType
            self.blogConfiguration = blogConfiguration
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.pageConfiguration = pageConfiguration
            self.proxyConfiguration = proxyConfiguration
            self.secretArn = secretArn
            self.serverUrl = serverUrl
            self.spaceConfiguration = spaceConfiguration
            self.version = version
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.attachmentConfiguration?.validate(name: "\(name).attachmentConfiguration")
            try self.blogConfiguration?.validate(name: "\(name).blogConfiguration")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.pageConfiguration?.validate(name: "\(name).pageConfiguration")
            try self.proxyConfiguration?.validate(name: "\(name).proxyConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, max: 2048)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, min: 1)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.spaceConfiguration?.validate(name: "\(name).spaceConfiguration")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentConfiguration = "AttachmentConfiguration"
            case authenticationType = "AuthenticationType"
            case blogConfiguration = "BlogConfiguration"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case pageConfiguration = "PageConfiguration"
            case proxyConfiguration = "ProxyConfiguration"
            case secretArn = "SecretArn"
            case serverUrl = "ServerUrl"
            case spaceConfiguration = "SpaceConfiguration"
            case version = "Version"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct ConfluencePageConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Maps attributes or field names of Confluence pages to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Confluence fields. For more information, see Mapping data source fields. The Confluence data source field names must exist in your Confluence custom metadata. If you specify the PageFieldMappings parameter, you must specify at least one field mapping.
        public let pageFieldMappings: [ConfluencePageToIndexFieldMapping]?

        @inlinable
        public init(pageFieldMappings: [ConfluencePageToIndexFieldMapping]? = nil) {
            self.pageFieldMappings = pageFieldMappings
        }

        public func validate(name: String) throws {
            try self.pageFieldMappings?.forEach {
                try $0.validate(name: "\(name).pageFieldMappings[]")
            }
            try self.validate(self.pageFieldMappings, name: "pageFieldMappings", parent: name, max: 12)
            try self.validate(self.pageFieldMappings, name: "pageFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pageFieldMappings = "PageFieldMappings"
        }
    }

    public struct ConfluencePageToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluencePageFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        @inlinable
        public init(dataSourceFieldName: ConfluencePageFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceSpaceConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to index archived spaces.
        public let crawlArchivedSpaces: Bool?
        ///  TRUE to index personal spaces. You can add restrictions to items in personal spaces. If personal spaces are indexed, queries without user context information may return restricted items from a personal space in their results. For more information, see Filtering on user context.
        public let crawlPersonalSpaces: Bool?
        /// A list of space keys of Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are not indexed. If a space is in both the ExcludeSpaces and the IncludeSpaces list, the space is excluded.
        public let excludeSpaces: [String]?
        /// A list of space keys for Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are indexed. Spaces that aren't in the list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra logs an error when the data source is synchronized. If a space is in both the IncludeSpaces and the ExcludeSpaces list, the space is excluded.
        public let includeSpaces: [String]?
        /// Maps attributes or field names of Confluence spaces to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Confluence fields. For more information, see Mapping data source fields. The Confluence data source field names must exist in your Confluence custom metadata. If you specify the SpaceFieldMappings parameter, you must specify at least one field mapping.
        public let spaceFieldMappings: [ConfluenceSpaceToIndexFieldMapping]?

        @inlinable
        public init(crawlArchivedSpaces: Bool? = nil, crawlPersonalSpaces: Bool? = nil, excludeSpaces: [String]? = nil, includeSpaces: [String]? = nil, spaceFieldMappings: [ConfluenceSpaceToIndexFieldMapping]? = nil) {
            self.crawlArchivedSpaces = crawlArchivedSpaces
            self.crawlPersonalSpaces = crawlPersonalSpaces
            self.excludeSpaces = excludeSpaces
            self.includeSpaces = includeSpaces
            self.spaceFieldMappings = spaceFieldMappings
        }

        public func validate(name: String) throws {
            try self.excludeSpaces?.forEach {
                try validate($0, name: "excludeSpaces[]", parent: name, max: 255)
                try validate($0, name: "excludeSpaces[]", parent: name, min: 1)
                try validate($0, name: "excludeSpaces[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeSpaces, name: "excludeSpaces", parent: name, min: 1)
            try self.includeSpaces?.forEach {
                try validate($0, name: "includeSpaces[]", parent: name, max: 255)
                try validate($0, name: "includeSpaces[]", parent: name, min: 1)
                try validate($0, name: "includeSpaces[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.includeSpaces, name: "includeSpaces", parent: name, min: 1)
            try self.spaceFieldMappings?.forEach {
                try $0.validate(name: "\(name).spaceFieldMappings[]")
            }
            try self.validate(self.spaceFieldMappings, name: "spaceFieldMappings", parent: name, max: 4)
            try self.validate(self.spaceFieldMappings, name: "spaceFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlArchivedSpaces = "CrawlArchivedSpaces"
            case crawlPersonalSpaces = "CrawlPersonalSpaces"
            case excludeSpaces = "ExcludeSpaces"
            case includeSpaces = "IncludeSpaces"
            case spaceFieldMappings = "SpaceFieldMappings"
        }
    }

    public struct ConfluenceSpaceToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluenceSpaceFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        @inlinable
        public init(dataSourceFieldName: ConfluenceSpaceFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConnectionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
        public let databaseHost: String
        /// The name of the database containing the document data.
        public let databaseName: String
        /// The port that the database uses for connections.
        public let databasePort: Int
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that stores  the credentials. The credentials should be a user-password pair. For more information, see Using a Database Data Source. For more information about Secrets Manager, see  What Is Secrets Manager in the Secrets Manager  user guide.
        public let secretArn: String
        /// The name of the table that contains the document data.
        public let tableName: String

        @inlinable
        public init(databaseHost: String, databaseName: String, databasePort: Int, secretArn: String, tableName: String) {
            self.databaseHost = databaseHost
            self.databaseName = databaseName
            self.databasePort = databasePort
            self.secretArn = secretArn
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseHost, name: "databaseHost", parent: name, max: 253)
            try self.validate(self.databaseHost, name: "databaseHost", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 100)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.databasePort, name: "databasePort", parent: name, max: 65535)
            try self.validate(self.databasePort, name: "databasePort", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 100)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case databaseHost = "DatabaseHost"
            case databaseName = "DatabaseName"
            case databasePort = "DatabasePort"
            case secretArn = "SecretArn"
            case tableName = "TableName"
        }
    }

    public struct ContentSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the data sources you want to use for your Amazon Kendra experience.
        public let dataSourceIds: [String]?
        ///  TRUE to use documents you indexed directly using the BatchPutDocument API.
        public let directPutContent: Bool?
        /// The identifier of the FAQs that you want to use for your Amazon Kendra experience.
        public let faqIds: [String]?

        @inlinable
        public init(dataSourceIds: [String]? = nil, directPutContent: Bool? = nil, faqIds: [String]? = nil) {
            self.dataSourceIds = dataSourceIds
            self.directPutContent = directPutContent
            self.faqIds = faqIds
        }

        public func validate(name: String) throws {
            try self.dataSourceIds?.forEach {
                try validate($0, name: "dataSourceIds[]", parent: name, max: 100)
                try validate($0, name: "dataSourceIds[]", parent: name, min: 1)
                try validate($0, name: "dataSourceIds[]", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.dataSourceIds, name: "dataSourceIds", parent: name, max: 100)
            try self.validate(self.dataSourceIds, name: "dataSourceIds", parent: name, min: 1)
            try self.faqIds?.forEach {
                try validate($0, name: "faqIds[]", parent: name, max: 100)
                try validate($0, name: "faqIds[]", parent: name, min: 1)
                try validate($0, name: "faqIds[]", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.faqIds, name: "faqIds", parent: name, max: 100)
            try self.validate(self.faqIds, name: "faqIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceIds = "DataSourceIds"
            case directPutContent = "DirectPutContent"
            case faqIds = "FaqIds"
        }
    }

    public struct Correction: AWSDecodableShape {
        /// The zero-based location in the response string or text where  the corrected word starts.
        public let beginOffset: Int?
        /// The string or text of a corrected misspelled word in a query.
        public let correctedTerm: String?
        /// The zero-based location in the response string or text where  the corrected word ends.
        public let endOffset: Int?
        /// The string or text of a misspelled word in a query.
        public let term: String?

        @inlinable
        public init(beginOffset: Int? = nil, correctedTerm: String? = nil, endOffset: Int? = nil, term: String? = nil) {
            self.beginOffset = beginOffset
            self.correctedTerm = correctedTerm
            self.endOffset = endOffset
            self.term = term
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case correctedTerm = "CorrectedTerm"
            case endOffset = "EndOffset"
            case term = "Term"
        }
    }

    public struct CreateAccessControlConfigurationRequest: AWSEncodableShape {
        /// Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
        public let accessControlList: [Principal]?
        /// A token that you provide to identify the request to create an access control configuration. Multiple calls to the CreateAccessControlConfiguration API with the same client token will create only one access control configuration.
        public let clientToken: String?
        /// A description for the access control configuration.
        public let description: String?
        /// The list of principal lists that define the hierarchy for which documents users should have access to.
        public let hierarchicalAccessControlList: [HierarchicalPrincipal]?
        /// The identifier of the index to create an access control configuration for your documents.
        public let indexId: String
        /// A name for the access control configuration.
        public let name: String

        @inlinable
        public init(accessControlList: [Principal]? = nil, clientToken: String? = CreateAccessControlConfigurationRequest.idempotencyToken(), description: String? = nil, hierarchicalAccessControlList: [HierarchicalPrincipal]? = nil, indexId: String, name: String) {
            self.accessControlList = accessControlList
            self.clientToken = clientToken
            self.description = description
            self.hierarchicalAccessControlList = hierarchicalAccessControlList
            self.indexId = indexId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.accessControlList?.forEach {
                try $0.validate(name: "\(name).accessControlList[]")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.hierarchicalAccessControlList?.forEach {
                try $0.validate(name: "\(name).hierarchicalAccessControlList[]")
            }
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, max: 30)
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\S\\s]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlList = "AccessControlList"
            case clientToken = "ClientToken"
            case description = "Description"
            case hierarchicalAccessControlList = "HierarchicalAccessControlList"
            case indexId = "IndexId"
            case name = "Name"
        }
    }

    public struct CreateAccessControlConfigurationResponse: AWSDecodableShape {
        /// The identifier of the access control configuration for your documents in an index.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateDataSourceRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a data source connector. Multiple calls to the CreateDataSource API with the same client token will create only one data source connector.
        public let clientToken: String?
        /// Configuration information to connect to your data source repository. You can't specify the Configuration parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception. The Configuration parameter is required for all other data sources.
        public let configuration: DataSourceConfiguration?
        /// Configuration information for altering document metadata and content during the document ingestion process. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// A description for the data source connector.
        public let description: String?
        /// The identifier of the index you want to use with the data source connector.
        public let indexId: String
        /// The code for a language. This allows you to support a language for all  documents when creating the data source connector. English is supported  by default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// A name for the data source connector.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access  the data source and required resources. For more information, see IAM access roles for Amazon Kendra.. You can't specify the RoleArn parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception. The RoleArn parameter is required for all other data sources.
        public let roleArn: String?
        /// Sets the frequency for Amazon Kendra to check the documents in your data source repository and update the index. If you don't set a schedule Amazon Kendra will not periodically update the index. You can call the StartDataSourceSyncJob API to update the index. Specify a cron- format schedule string or an empty string to indicate that  the index is updated on demand. You can't specify the Schedule parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.
        public let schedule: String?
        /// A list of key-value pairs that identify or categorize the data source connector. You  can also use tags to help control access to the data source connector. Tag keys and values  can consist of Unicode letters, digits, white space, and any of the following symbols:  _ . : / = + - @.
        public let tags: [Tag]?
        /// The type of data source repository. For example, SHAREPOINT.
        public let type: DataSourceType
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your data source. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(clientToken: String? = CreateDataSourceRequest.idempotencyToken(), configuration: DataSourceConfiguration? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, indexId: String, languageCode: String? = nil, name: String, roleArn: String? = nil, schedule: String? = nil, tags: [Tag]? = nil, type: DataSourceType, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.clientToken = clientToken
            self.configuration = configuration
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
            self.tags = tags
            self.type = type
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.configuration?.validate(name: "\(name).configuration")
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case configuration = "Configuration"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
            case tags = "Tags"
            case type = "Type"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct CreateDataSourceResponse: AWSDecodableShape {
        /// The identifier of the data source connector.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateExperienceRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create your Amazon Kendra experience. Multiple calls to the CreateExperience API with the same client  token creates only one Amazon Kendra experience.
        public let clientToken: String?
        /// Configuration information for your Amazon Kendra experience. This includes ContentSourceConfiguration, which specifies the data source IDs  and/or FAQ IDs, and UserIdentityConfiguration, which specifies the  user or group information to grant access to your Amazon Kendra experience.
        public let configuration: ExperienceConfiguration?
        /// A description for your Amazon Kendra experience.
        public let description: String?
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// A name for your Amazon Kendra experience.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access  Query API, GetQuerySuggestions API, and other required APIs.  The role also must include permission to access IAM Identity Center that stores your  user and group information. For more information, see IAM access roles for Amazon Kendra.
        public let roleArn: String?

        @inlinable
        public init(clientToken: String? = CreateExperienceRequest.idempotencyToken(), configuration: ExperienceConfiguration? = nil, description: String? = nil, indexId: String, name: String, roleArn: String? = nil) {
            self.clientToken = clientToken
            self.configuration = configuration
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.configuration?.validate(name: "\(name).configuration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case configuration = "Configuration"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
        }
    }

    public struct CreateExperienceResponse: AWSDecodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateFaqRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a FAQ. Multiple calls to the CreateFaqRequest API with the same client token will create only one FAQ.
        public let clientToken: String?
        /// A description for the FAQ.
        public let description: String?
        /// The format of the FAQ input file. You can choose between a basic CSV format, a CSV format that includes customs attributes in a header, and a JSON format that includes custom attributes. The default format is CSV. The format must match the format of the file stored in the S3 bucket identified in  the S3Path parameter. For more information, see Adding questions and answers.
        public let fileFormat: FaqFileFormat?
        /// The identifier of the index for the FAQ.
        public let indexId: String
        /// The code for a language. This allows you to support a language  for the FAQ document. English is supported by default.  For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// A name for the FAQ.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access  the S3 bucket that contains the FAQ file. For more information, see IAM access roles for  Amazon Kendra.
        public let roleArn: String
        /// The path to the FAQ file in S3.
        public let s3Path: S3Path
        /// A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.
        public let tags: [Tag]?

        @inlinable
        public init(clientToken: String? = CreateFaqRequest.idempotencyToken(), description: String? = nil, fileFormat: FaqFileFormat? = nil, indexId: String, languageCode: String? = nil, name: String, roleArn: String, s3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.fileFormat = fileFormat
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.s3Path = s3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.s3Path.validate(name: "\(name).s3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case fileFormat = "FileFormat"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case s3Path = "S3Path"
            case tags = "Tags"
        }
    }

    public struct CreateFaqResponse: AWSDecodableShape {
        /// The identifier of the FAQ.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateFeaturedResultsSetRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a set of  featured results. Multiple calls to the CreateFeaturedResultsSet  API with the same client token will create only one featured results set.
        public let clientToken: String?
        /// A description for the set of featured results.
        public let description: String?
        /// A list of document IDs for the documents you want to feature at the  top of the search results page. For more information on the list of  documents, see FeaturedResultsSet.
        public let featuredDocuments: [FeaturedDocument]?
        /// A name for the set of featured results.
        public let featuredResultsSetName: String
        /// The identifier of the index that you want to use for featuring results.
        public let indexId: String
        /// A list of queries for featuring results. For more information on the  list of queries, see FeaturedResultsSet.
        public let queryTexts: [String]?
        /// The current status of the set of featured results. When the value is  ACTIVE, featured results are ready for use. You can still  configure your settings before setting the status to ACTIVE.  You can set the status to ACTIVE or INACTIVE  using the UpdateFeaturedResultsSet API. The queries you specify for  featured results must be unique per featured results set for each index,  whether the status is ACTIVE or INACTIVE.
        public let status: FeaturedResultsSetStatus?
        /// A list of key-value pairs that identify or categorize the featured results set. You can also use tags to help control access to the featured results set. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols:_ . : / = + - @.
        public let tags: [Tag]?

        @inlinable
        public init(clientToken: String? = nil, description: String? = nil, featuredDocuments: [FeaturedDocument]? = nil, featuredResultsSetName: String, indexId: String, queryTexts: [String]? = nil, status: FeaturedResultsSetStatus? = nil, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.featuredDocuments = featuredDocuments
            self.featuredResultsSetName = featuredResultsSetName
            self.indexId = indexId
            self.queryTexts = queryTexts
            self.status = status
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.featuredDocuments?.forEach {
                try $0.validate(name: "\(name).featuredDocuments[]")
            }
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, max: 1000)
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, min: 1)
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, pattern: "^[a-zA-Z0-9][ a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryTexts, name: "queryTexts", parent: name, max: 49)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case featuredDocuments = "FeaturedDocuments"
            case featuredResultsSetName = "FeaturedResultsSetName"
            case indexId = "IndexId"
            case queryTexts = "QueryTexts"
            case status = "Status"
            case tags = "Tags"
        }
    }

    public struct CreateFeaturedResultsSetResponse: AWSDecodableShape {
        /// Information on the set of featured results. This includes the identifier of  the featured results set, whether the featured results set is active or inactive,  when the featured results set was created, and more.
        public let featuredResultsSet: FeaturedResultsSet?

        @inlinable
        public init(featuredResultsSet: FeaturedResultsSet? = nil) {
            self.featuredResultsSet = featuredResultsSet
        }

        private enum CodingKeys: String, CodingKey {
            case featuredResultsSet = "FeaturedResultsSet"
        }
    }

    public struct CreateIndexRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex API with the same client token will create only one index.
        public let clientToken: String?
        /// A description for the index.
        public let description: String?
        /// The Amazon Kendra edition to use for the index. Choose DEVELOPER_EDITION for indexes intended for development, testing, or proof of concept. Use ENTERPRISE_EDITION for production. Use GEN_AI_ENTERPRISE_EDITION for creating generative AI applications. Once you set the edition for an index, it can't be changed.  The Edition parameter is optional. If you don't supply a value, the default is ENTERPRISE_EDITION. For more information on quota limits for Gen AI Enterprise Edition, Enterprise Edition, and Developer Edition indices, see Quotas.
        public let edition: IndexEdition?
        /// A name for the index.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access your Amazon CloudWatch logs and metrics. For more information, see IAM access roles for Amazon Kendra.
        public let roleArn: String
        /// The identifier of the KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration?
        /// A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
        public let tags: [Tag]?
        /// The user context policy.  If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use ATTRIBUTE_FILTER to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use USER_TOKEN to configure user context policy, Amazon Kendra returns a ValidationException error.   ATTRIBUTE_FILTER  All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of _user_id and _group_ids or you can provide user and group information in UserContext.   USER_TOKEN  Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.
        public let userContextPolicy: UserContextPolicy?
        /// Gets users and groups from IAM Identity Center identity source. To configure this, see UserGroupResolutionConfiguration. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.  If you're using an Amazon Kendra Gen AI Enterprise Edition index, UserGroupResolutionConfiguration isn't supported.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration.  If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use UserTokenConfigurations to configure user context policy, Amazon Kendra returns a ValidationException error.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        @inlinable
        public init(clientToken: String? = CreateIndexRequest.idempotencyToken(), description: String? = nil, edition: IndexEdition? = nil, name: String, roleArn: String, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil, tags: [Tag]? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.edition = edition
            self.name = name
            self.roleArn = roleArn
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.tags = tags
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.serverSideEncryptionConfiguration?.validate(name: "\(name).serverSideEncryptionConfiguration")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.userTokenConfigurations?.forEach {
                try $0.validate(name: "\(name).userTokenConfigurations[]")
            }
            try self.validate(self.userTokenConfigurations, name: "userTokenConfigurations", parent: name, max: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case edition = "Edition"
            case name = "Name"
            case roleArn = "RoleArn"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case tags = "Tags"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct CreateIndexResponse: AWSDecodableShape {
        /// The identifier of the index. Use this identifier when you query an index, set up a data source, or index a document.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a  query suggestions block list.
        public let clientToken: String?
        /// A description for the block list. For example, the description "List of all offensive words that can  appear in user queries and need to be blocked from suggestions."
        public let description: String?
        /// The identifier of the index you want to create a query suggestions block list for.
        public let indexId: String
        /// A name for the block list. For example, the name 'offensive-words', which includes all  offensive words that could appear in user queries and need to be  blocked from suggestions.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission to  access your S3 bucket that contains the block list text file. For more information,  see IAM access roles for  Amazon Kendra.
        public let roleArn: String
        /// The S3 path to your block list text file in your S3 bucket. Each block word or phrase should be on a separate line in a text file. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let sourceS3Path: S3Path
        /// A list of key-value pairs that identify or categorize the block list.  Tag keys and values can consist of Unicode letters, digits, white space,  and any of the following symbols: _ . : / = + - @.
        public let tags: [Tag]?

        @inlinable
        public init(clientToken: String? = CreateQuerySuggestionsBlockListRequest.idempotencyToken(), description: String? = nil, indexId: String, name: String, roleArn: String, sourceS3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path.validate(name: "\(name).sourceS3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case tags = "Tags"
        }
    }

    public struct CreateQuerySuggestionsBlockListResponse: AWSDecodableShape {
        /// The identifier of the block list.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateThesaurusRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a  thesaurus. Multiple calls to the CreateThesaurus API  with the same client token will create only one thesaurus.
        public let clientToken: String?
        /// A description for the thesaurus.
        public let description: String?
        /// The identifier of the index for the thesaurus.
        public let indexId: String
        /// A name for the thesaurus.
        public let name: String
        /// The Amazon Resource Name (ARN) of an IAM role with permission  to access your S3 bucket that contains the thesaurus file. For more information,  see IAM  access roles for Amazon Kendra.
        public let roleArn: String
        /// The path to the thesaurus file in S3.
        public let sourceS3Path: S3Path
        /// A list of key-value pairs that identify or categorize the thesaurus. You can  also use tags to help control access to the thesaurus. Tag keys and values can  consist of Unicode letters, digits, white space, and any of the following  symbols: _ . : / = + - @.
        public let tags: [Tag]?

        @inlinable
        public init(clientToken: String? = CreateThesaurusRequest.idempotencyToken(), description: String? = nil, indexId: String, name: String, roleArn: String, sourceS3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path.validate(name: "\(name).sourceS3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case tags = "Tags"
        }
    }

    public struct CreateThesaurusResponse: AWSDecodableShape {
        /// The identifier of the thesaurus.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CustomDocumentEnrichmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Kendra.
        public let inlineConfigurations: [InlineCustomDocumentEnrichmentConfiguration]?
        /// Configuration information for invoking a Lambda function in Lambda on the structured documents with their metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced data manipulation.
        public let postExtractionHookConfiguration: HookConfiguration?
        /// Configuration information for invoking a Lambda function in Lambda on the original or raw documents before extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced data manipulation.
        public let preExtractionHookConfiguration: HookConfiguration?
        /// The Amazon Resource Name (ARN) of an IAM role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process. For more information, see an IAM roles for Amazon Kendra.
        public let roleArn: String?

        @inlinable
        public init(inlineConfigurations: [InlineCustomDocumentEnrichmentConfiguration]? = nil, postExtractionHookConfiguration: HookConfiguration? = nil, preExtractionHookConfiguration: HookConfiguration? = nil, roleArn: String? = nil) {
            self.inlineConfigurations = inlineConfigurations
            self.postExtractionHookConfiguration = postExtractionHookConfiguration
            self.preExtractionHookConfiguration = preExtractionHookConfiguration
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.inlineConfigurations?.forEach {
                try $0.validate(name: "\(name).inlineConfigurations[]")
            }
            try self.validate(self.inlineConfigurations, name: "inlineConfigurations", parent: name, max: 100)
            try self.postExtractionHookConfiguration?.validate(name: "\(name).postExtractionHookConfiguration")
            try self.preExtractionHookConfiguration?.validate(name: "\(name).preExtractionHookConfiguration")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inlineConfigurations = "InlineConfigurations"
            case postExtractionHookConfiguration = "PostExtractionHookConfiguration"
            case preExtractionHookConfiguration = "PreExtractionHookConfiguration"
            case roleArn = "RoleArn"
        }
    }

    public struct DataSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides the configuration information to connect to Alfresco as your data source.  Support for AlfrescoConfiguration ended May 2023.  We recommend migrating to or using the Alfresco data source template  schema / TemplateConfiguration  API.
        public let alfrescoConfiguration: AlfrescoConfiguration?
        /// Provides the configuration information to connect to Box as your data source.
        public let boxConfiguration: BoxConfiguration?
        /// Provides the configuration information to connect to Confluence as your data source.
        public let confluenceConfiguration: ConfluenceConfiguration?
        /// Provides the configuration information to connect to a database as your data source.
        public let databaseConfiguration: DatabaseConfiguration?
        /// Provides the configuration information to connect to Amazon FSx as your data source.  Amazon Kendra now supports an upgraded Amazon FSx Windows connector. You must now use the TemplateConfiguration object instead of the  FsxConfiguration object to configure your connector. Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector. We recommended migrating your connector workflow to the upgraded version. Support for  connectors configured using the older architecture is scheduled to end by June 2024.
        public let fsxConfiguration: FsxConfiguration?
        /// Provides the configuration information to connect to GitHub as your data source.  Amazon Kendra now supports an upgraded GitHub connector. You must now use the TemplateConfiguration object instead of the GitHubConfiguration object to configure your connector. Connectors configured using the older console and API architecture will continue to function as configured. However, you won’t be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector. We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
        public let gitHubConfiguration: GitHubConfiguration?
        /// Provides the configuration information to connect to Google Drive as your data source.
        public let googleDriveConfiguration: GoogleDriveConfiguration?
        /// Provides the configuration information to connect to Jira as your data source.
        public let jiraConfiguration: JiraConfiguration?
        /// Provides the configuration information to connect to Microsoft OneDrive as your data source.
        public let oneDriveConfiguration: OneDriveConfiguration?
        /// Provides the configuration information to connect to Quip as your data source.
        public let quipConfiguration: QuipConfiguration?
        /// Provides the configuration information to connect to an Amazon S3 bucket as your data source.  Amazon Kendra now supports an upgraded Amazon S3 connector. You must now use the TemplateConfiguration object instead of the  S3DataSourceConfiguration object to configure your connector. Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector. We recommended migrating your connector workflow to the upgraded version. Support for  connectors configured using the older architecture is scheduled to end by June 2024.
        public let s3Configuration: S3DataSourceConfiguration?
        /// Provides the configuration information to connect to Salesforce as your data source.
        public let salesforceConfiguration: SalesforceConfiguration?
        /// Provides the configuration information to connect to ServiceNow as your data source.
        public let serviceNowConfiguration: ServiceNowConfiguration?
        /// Provides the configuration information to connect to Microsoft SharePoint as your data source.
        public let sharePointConfiguration: SharePointConfiguration?
        /// Provides the configuration information to connect to Slack as your data source.  Amazon Kendra now supports an upgraded Slack connector. You must now use the TemplateConfiguration object instead of the  SlackConfiguration object to configure your connector. Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector. We recommended migrating your connector workflow to the upgraded version. Support for  connectors configured using the older architecture is scheduled to end by June 2024.
        public let slackConfiguration: SlackConfiguration?
        /// Provides a template for the configuration information to connect to your data source.
        public let templateConfiguration: TemplateConfiguration?
        public let webCrawlerConfiguration: WebCrawlerConfiguration?
        /// Provides the configuration information to connect to Amazon WorkDocs as your data source.
        public let workDocsConfiguration: WorkDocsConfiguration?

        @inlinable
        public init(boxConfiguration: BoxConfiguration? = nil, confluenceConfiguration: ConfluenceConfiguration? = nil, databaseConfiguration: DatabaseConfiguration? = nil, fsxConfiguration: FsxConfiguration? = nil, gitHubConfiguration: GitHubConfiguration? = nil, googleDriveConfiguration: GoogleDriveConfiguration? = nil, jiraConfiguration: JiraConfiguration? = nil, oneDriveConfiguration: OneDriveConfiguration? = nil, quipConfiguration: QuipConfiguration? = nil, s3Configuration: S3DataSourceConfiguration? = nil, salesforceConfiguration: SalesforceConfiguration? = nil, serviceNowConfiguration: ServiceNowConfiguration? = nil, sharePointConfiguration: SharePointConfiguration? = nil, slackConfiguration: SlackConfiguration? = nil, templateConfiguration: TemplateConfiguration? = nil, webCrawlerConfiguration: WebCrawlerConfiguration? = nil, workDocsConfiguration: WorkDocsConfiguration? = nil) {
            self.alfrescoConfiguration = nil
            self.boxConfiguration = boxConfiguration
            self.confluenceConfiguration = confluenceConfiguration
            self.databaseConfiguration = databaseConfiguration
            self.fsxConfiguration = fsxConfiguration
            self.gitHubConfiguration = gitHubConfiguration
            self.googleDriveConfiguration = googleDriveConfiguration
            self.jiraConfiguration = jiraConfiguration
            self.oneDriveConfiguration = oneDriveConfiguration
            self.quipConfiguration = quipConfiguration
            self.s3Configuration = s3Configuration
            self.salesforceConfiguration = salesforceConfiguration
            self.serviceNowConfiguration = serviceNowConfiguration
            self.sharePointConfiguration = sharePointConfiguration
            self.slackConfiguration = slackConfiguration
            self.templateConfiguration = templateConfiguration
            self.webCrawlerConfiguration = webCrawlerConfiguration
            self.workDocsConfiguration = workDocsConfiguration
        }

        @available(*, deprecated, message: "Members alfrescoConfiguration have been deprecated")
        @inlinable
        public init(alfrescoConfiguration: AlfrescoConfiguration? = nil, boxConfiguration: BoxConfiguration? = nil, confluenceConfiguration: ConfluenceConfiguration? = nil, databaseConfiguration: DatabaseConfiguration? = nil, fsxConfiguration: FsxConfiguration? = nil, gitHubConfiguration: GitHubConfiguration? = nil, googleDriveConfiguration: GoogleDriveConfiguration? = nil, jiraConfiguration: JiraConfiguration? = nil, oneDriveConfiguration: OneDriveConfiguration? = nil, quipConfiguration: QuipConfiguration? = nil, s3Configuration: S3DataSourceConfiguration? = nil, salesforceConfiguration: SalesforceConfiguration? = nil, serviceNowConfiguration: ServiceNowConfiguration? = nil, sharePointConfiguration: SharePointConfiguration? = nil, slackConfiguration: SlackConfiguration? = nil, templateConfiguration: TemplateConfiguration? = nil, webCrawlerConfiguration: WebCrawlerConfiguration? = nil, workDocsConfiguration: WorkDocsConfiguration? = nil) {
            self.alfrescoConfiguration = alfrescoConfiguration
            self.boxConfiguration = boxConfiguration
            self.confluenceConfiguration = confluenceConfiguration
            self.databaseConfiguration = databaseConfiguration
            self.fsxConfiguration = fsxConfiguration
            self.gitHubConfiguration = gitHubConfiguration
            self.googleDriveConfiguration = googleDriveConfiguration
            self.jiraConfiguration = jiraConfiguration
            self.oneDriveConfiguration = oneDriveConfiguration
            self.quipConfiguration = quipConfiguration
            self.s3Configuration = s3Configuration
            self.salesforceConfiguration = salesforceConfiguration
            self.serviceNowConfiguration = serviceNowConfiguration
            self.sharePointConfiguration = sharePointConfiguration
            self.slackConfiguration = slackConfiguration
            self.templateConfiguration = templateConfiguration
            self.webCrawlerConfiguration = webCrawlerConfiguration
            self.workDocsConfiguration = workDocsConfiguration
        }

        public func validate(name: String) throws {
            try self.alfrescoConfiguration?.validate(name: "\(name).alfrescoConfiguration")
            try self.boxConfiguration?.validate(name: "\(name).boxConfiguration")
            try self.confluenceConfiguration?.validate(name: "\(name).confluenceConfiguration")
            try self.databaseConfiguration?.validate(name: "\(name).databaseConfiguration")
            try self.fsxConfiguration?.validate(name: "\(name).fsxConfiguration")
            try self.gitHubConfiguration?.validate(name: "\(name).gitHubConfiguration")
            try self.googleDriveConfiguration?.validate(name: "\(name).googleDriveConfiguration")
            try self.jiraConfiguration?.validate(name: "\(name).jiraConfiguration")
            try self.oneDriveConfiguration?.validate(name: "\(name).oneDriveConfiguration")
            try self.quipConfiguration?.validate(name: "\(name).quipConfiguration")
            try self.s3Configuration?.validate(name: "\(name).s3Configuration")
            try self.salesforceConfiguration?.validate(name: "\(name).salesforceConfiguration")
            try self.serviceNowConfiguration?.validate(name: "\(name).serviceNowConfiguration")
            try self.sharePointConfiguration?.validate(name: "\(name).sharePointConfiguration")
            try self.slackConfiguration?.validate(name: "\(name).slackConfiguration")
            try self.webCrawlerConfiguration?.validate(name: "\(name).webCrawlerConfiguration")
            try self.workDocsConfiguration?.validate(name: "\(name).workDocsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case alfrescoConfiguration = "AlfrescoConfiguration"
            case boxConfiguration = "BoxConfiguration"
            case confluenceConfiguration = "ConfluenceConfiguration"
            case databaseConfiguration = "DatabaseConfiguration"
            case fsxConfiguration = "FsxConfiguration"
            case gitHubConfiguration = "GitHubConfiguration"
            case googleDriveConfiguration = "GoogleDriveConfiguration"
            case jiraConfiguration = "JiraConfiguration"
            case oneDriveConfiguration = "OneDriveConfiguration"
            case quipConfiguration = "QuipConfiguration"
            case s3Configuration = "S3Configuration"
            case salesforceConfiguration = "SalesforceConfiguration"
            case serviceNowConfiguration = "ServiceNowConfiguration"
            case sharePointConfiguration = "SharePointConfiguration"
            case slackConfiguration = "SlackConfiguration"
            case templateConfiguration = "TemplateConfiguration"
            case webCrawlerConfiguration = "WebCrawlerConfiguration"
            case workDocsConfiguration = "WorkDocsConfiguration"
        }
    }

    public struct DataSourceGroup: AWSEncodableShape {
        /// The identifier of the data source group you want to add to your list of data source groups. This is for filtering search results based on the groups' access to documents in that data source.
        public let dataSourceId: String
        /// The identifier of the group you want to add to your list of groups. This is for filtering search results based on the groups' access to documents.
        public let groupId: String

        @inlinable
        public init(dataSourceId: String, groupId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 200)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
        }
    }

    public struct DataSourceSummary: AWSDecodableShape {
        /// The Unix timestamp when the data source connector was created.
        public let createdAt: Date?
        /// The identifier for the data source.
        public let id: String?
        /// The code for a language. This shows a supported language for all documents  in the data source. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name of the data source.
        public let name: String?
        /// The status of the data source. When the status is ACTIVE the data source is ready to use.
        public let status: DataSourceStatus?
        /// The type of the data source.
        public let type: DataSourceType?
        /// The Unix timestamp when the data source connector was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, id: String? = nil, languageCode: String? = nil, name: String? = nil, status: DataSourceStatus? = nil, type: DataSourceType? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.languageCode = languageCode
            self.name = name
            self.status = status
            self.type = type
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case languageCode = "LanguageCode"
            case name = "Name"
            case status = "Status"
            case type = "Type"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DataSourceSyncJob: AWSDecodableShape {
        /// If the reason that the synchronization failed is due to an error with the underlying data source, this field contains a code that identifies the error.
        public let dataSourceErrorCode: String?
        /// The Unix timestamp when the synchronization job completed.
        public let endTime: Date?
        /// If the Status field is set to FAILED, the ErrorCode field indicates the reason the synchronization failed.
        public let errorCode: ErrorCode?
        /// If the Status field is set to ERROR, the ErrorMessage field contains a description of the error that caused the synchronization to fail.
        public let errorMessage: String?
        /// A identifier for the synchronization job.
        public let executionId: String?
        /// Maps a batch delete document request to a specific data source sync job. This is optional and should only be supplied when documents are deleted by a data source connector.
        public let metrics: DataSourceSyncJobMetrics?
        /// The Unix timestamp when the synchronization job started.
        public let startTime: Date?
        /// The execution status of the synchronization job. When the Status field is set to SUCCEEDED, the synchronization job is done. If the status code is set to FAILED, the ErrorCode and ErrorMessage fields give you the reason for the failure.
        public let status: DataSourceSyncJobStatus?

        @inlinable
        public init(dataSourceErrorCode: String? = nil, endTime: Date? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil, executionId: String? = nil, metrics: DataSourceSyncJobMetrics? = nil, startTime: Date? = nil, status: DataSourceSyncJobStatus? = nil) {
            self.dataSourceErrorCode = dataSourceErrorCode
            self.endTime = endTime
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.executionId = executionId
            self.metrics = metrics
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceErrorCode = "DataSourceErrorCode"
            case endTime = "EndTime"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case executionId = "ExecutionId"
            case metrics = "Metrics"
            case startTime = "StartTime"
            case status = "Status"
        }
    }

    public struct DataSourceSyncJobMetricTarget: AWSEncodableShape {
        /// The ID of the data source that is running the sync job.
        public let dataSourceId: String
        /// The ID of the sync job that is running on the data source. If the ID of a sync job is not provided and there is a sync job running, then the ID of this sync job is used and metrics are generated for this sync job. If the ID of a sync job is not provided and there is no sync job running, then no metrics are generated and documents are indexed/deleted at the index level without sync job metrics included.
        public let dataSourceSyncJobId: String?

        @inlinable
        public init(dataSourceId: String, dataSourceSyncJobId: String? = nil) {
            self.dataSourceId = dataSourceId
            self.dataSourceSyncJobId = dataSourceSyncJobId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, max: 100)
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, min: 1)
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case dataSourceSyncJobId = "DataSourceSyncJobId"
        }
    }

    public struct DataSourceSyncJobMetrics: AWSDecodableShape {
        /// The number of documents added from the data source up to now in the data source sync.
        public let documentsAdded: String?
        /// The number of documents deleted from the data source up to now in the data source sync run.
        public let documentsDeleted: String?
        /// The number of documents that failed to sync from the data source up to now in the data source sync run.
        public let documentsFailed: String?
        /// The number of documents modified in the data source up to now in the data source sync run.
        public let documentsModified: String?
        /// The current number of documents crawled by the current sync job in the data source.
        public let documentsScanned: String?

        @inlinable
        public init(documentsAdded: String? = nil, documentsDeleted: String? = nil, documentsFailed: String? = nil, documentsModified: String? = nil, documentsScanned: String? = nil) {
            self.documentsAdded = documentsAdded
            self.documentsDeleted = documentsDeleted
            self.documentsFailed = documentsFailed
            self.documentsModified = documentsModified
            self.documentsScanned = documentsScanned
        }

        private enum CodingKeys: String, CodingKey {
            case documentsAdded = "DocumentsAdded"
            case documentsDeleted = "DocumentsDeleted"
            case documentsFailed = "DocumentsFailed"
            case documentsModified = "DocumentsModified"
            case documentsScanned = "DocumentsScanned"
        }
    }

    public struct DataSourceToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source. You must first create the index field  using the UpdateIndex API.
        public let dataSourceFieldName: String
        /// The format for date fields in the data source. If the field specified in  DataSourceFieldName is a date field, you must specify the date  format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the data source field. The index field type  must match the data source field type.
        public let indexFieldName: String

        @inlinable
        public init(dataSourceFieldName: String, dateFieldFormat: String? = nil, indexFieldName: String) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, max: 100)
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, min: 1)
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct DataSourceVpcConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
        public let securityGroupIds: [String]
        /// A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
        public let subnetIds: [String]

        @inlinable
        public init(securityGroupIds: [String], subnetIds: [String]) {
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
        }

        public func validate(name: String) throws {
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 200)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^[-0-9a-zA-Z]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 10)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 200)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^[\\-0-9a-zA-Z]+$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 6)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
        }
    }

    public struct DatabaseConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Information about the database column that provides information for user context filtering.
        public let aclConfiguration: AclConfiguration?
        /// Information about where the index should get the document information from the database.
        public let columnConfiguration: ColumnConfiguration
        /// Configuration information that's required to connect to a database.
        public let connectionConfiguration: ConnectionConfiguration
        /// The type of database engine that runs the database.
        public let databaseEngineType: DatabaseEngineType
        /// Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
        public let sqlConfiguration: SqlConfiguration?
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(aclConfiguration: AclConfiguration? = nil, columnConfiguration: ColumnConfiguration, connectionConfiguration: ConnectionConfiguration, databaseEngineType: DatabaseEngineType, sqlConfiguration: SqlConfiguration? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.aclConfiguration = aclConfiguration
            self.columnConfiguration = columnConfiguration
            self.connectionConfiguration = connectionConfiguration
            self.databaseEngineType = databaseEngineType
            self.sqlConfiguration = sqlConfiguration
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.aclConfiguration?.validate(name: "\(name).aclConfiguration")
            try self.columnConfiguration.validate(name: "\(name).columnConfiguration")
            try self.connectionConfiguration.validate(name: "\(name).connectionConfiguration")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case aclConfiguration = "AclConfiguration"
            case columnConfiguration = "ColumnConfiguration"
            case connectionConfiguration = "ConnectionConfiguration"
            case databaseEngineType = "DatabaseEngineType"
            case sqlConfiguration = "SqlConfiguration"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct DeleteAccessControlConfigurationRequest: AWSEncodableShape {
        /// The identifier of the access control configuration you want to delete.
        public let id: String
        /// The identifier of the index for an access control configuration.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteAccessControlConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDataSourceRequest: AWSEncodableShape {
        /// The identifier of the data source connector you want to delete.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteExperienceRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience you want to delete.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteExperienceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteFaqRequest: AWSEncodableShape {
        /// The identifier of the FAQ you want to remove.
        public let id: String
        /// The identifier of the index for the FAQ.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteIndexRequest: AWSEncodableShape {
        /// The identifier of the index you want to delete.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct DeletePrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source you want to delete a group from. A group can be tied to multiple data sources. You can delete a group from accessing documents in a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. You want to delete "Research" and "Engineering" groups from Salesforce, so that these groups cannot access customer-related documents stored in Salesforce. Only "Sales and Marketing" should access documents in the Salesforce data source.
        public let dataSourceId: String?
        /// The identifier of the group you want to delete.
        public let groupId: String
        /// The identifier of the index you want to delete a group from.
        public let indexId: String
        /// The timestamp identifier you specify to ensure Amazon Kendra does not override the latest DELETE action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action. The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling PutPrincipalMapping. This ensures your DELETE action for that updated group with the latest members list doesn't get overwritten by earlier DELETE actions for the same group which are yet to be processed. The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.
        public let orderingId: Int64?

        @inlinable
        public init(dataSourceId: String? = nil, groupId: String, indexId: String, orderingId: Int64? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.indexId = indexId
            self.orderingId = orderingId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32535158400000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case indexId = "IndexId"
            case orderingId = "OrderingId"
        }
    }

    public struct DeleteQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// The identifier of the block list you want to delete.
        public let id: String
        /// The identifier of the index for the block list.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteThesaurusRequest: AWSEncodableShape {
        /// The identifier of the thesaurus you want to delete.
        public let id: String
        /// The identifier of the index for the thesaurus.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeAccessControlConfigurationRequest: AWSEncodableShape {
        /// The identifier of the access control configuration you want to get information on.
        public let id: String
        /// The identifier of the index for an access control configuration.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeAccessControlConfigurationResponse: AWSDecodableShape {
        /// Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
        public let accessControlList: [Principal]?
        /// The description for the access control configuration.
        public let description: String?
        /// The error message containing details if there are issues processing the access control configuration.
        public let errorMessage: String?
        /// The list of principal lists that define the hierarchy for which documents users should have access to.
        public let hierarchicalAccessControlList: [HierarchicalPrincipal]?
        /// The name for the access control configuration.
        public let name: String

        @inlinable
        public init(accessControlList: [Principal]? = nil, description: String? = nil, errorMessage: String? = nil, hierarchicalAccessControlList: [HierarchicalPrincipal]? = nil, name: String) {
            self.accessControlList = accessControlList
            self.description = description
            self.errorMessage = errorMessage
            self.hierarchicalAccessControlList = hierarchicalAccessControlList
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlList = "AccessControlList"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case hierarchicalAccessControlList = "HierarchicalAccessControlList"
            case name = "Name"
        }
    }

    public struct DescribeDataSourceRequest: AWSEncodableShape {
        /// The identifier of the data source connector.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeDataSourceResponse: AWSDecodableShape {
        /// Configuration details for the data source connector. This shows how the data source is configured. The configuration options for a data source depend on the data source provider.
        public let configuration: DataSourceConfiguration?
        /// The Unix timestamp when the data source connector was created.
        public let createdAt: Date?
        /// Configuration information for altering document metadata and content during the document ingestion process when you describe a data source. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// The description for the data source connector.
        public let description: String?
        /// When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source to fail.
        public let errorMessage: String?
        /// The identifier of the data source connector.
        public let id: String?
        /// The identifier of the index used with the data source connector.
        public let indexId: String?
        /// The code for a language. This shows a supported language for all  documents in the data source. English is supported by  default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name for the data source connector.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role with permission to  access the data source and required resources.
        public let roleArn: String?
        /// The schedule for Amazon Kendra to update the index.
        public let schedule: String?
        /// The current status of the data source connector. When the status is ACTIVE the data source is ready to use. When the status is FAILED, the ErrorMessage field contains the reason that the data source failed.
        public let status: DataSourceStatus?
        /// The type of the data source. For example, SHAREPOINT.
        public let type: DataSourceType?
        /// The Unix timestamp when the data source connector was last updated.
        public let updatedAt: Date?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your data source. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(configuration: DataSourceConfiguration? = nil, createdAt: Date? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, errorMessage: String? = nil, id: String? = nil, indexId: String? = nil, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, schedule: String? = nil, status: DataSourceStatus? = nil, type: DataSourceType? = nil, updatedAt: Date? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.configuration = configuration
            self.createdAt = createdAt
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.errorMessage = errorMessage
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
            self.status = status
            self.type = type
            self.updatedAt = updatedAt
            self.vpcConfiguration = vpcConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case createdAt = "CreatedAt"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
            case status = "Status"
            case type = "Type"
            case updatedAt = "UpdatedAt"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct DescribeExperienceRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience you want to get information on.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeExperienceResponse: AWSDecodableShape {
        /// Shows the configuration information for your Amazon Kendra experience. This includes ContentSourceConfiguration, which specifies the data source IDs  and/or FAQ IDs, and UserIdentityConfiguration, which specifies the  user or group information to grant access to your Amazon Kendra experience.
        public let configuration: ExperienceConfiguration?
        /// The Unix timestamp when your Amazon Kendra experience was created.
        public let createdAt: Date?
        /// Shows the description for your Amazon Kendra experience.
        public let description: String?
        /// Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by Amazon Web Services.
        public let endpoints: [ExperienceEndpoint]?
        /// The reason your Amazon Kendra experience could not properly process.
        public let errorMessage: String?
        /// Shows the identifier of your Amazon Kendra experience.
        public let id: String?
        /// Shows the identifier of the index for your Amazon Kendra experience.
        public let indexId: String?
        /// Shows the name of your Amazon Kendra experience.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role with permission to access  the Query API, QuerySuggestions API,  SubmitFeedback API, and IAM Identity Center that stores  your users and groups information.
        public let roleArn: String?
        /// The current processing status of your Amazon Kendra experience. When the status  is ACTIVE, your Amazon Kendra experience is ready to use. When the  status is FAILED, the ErrorMessage field contains  the reason that this failed.
        public let status: ExperienceStatus?
        /// The Unix timestamp when your Amazon Kendra experience was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(configuration: ExperienceConfiguration? = nil, createdAt: Date? = nil, description: String? = nil, endpoints: [ExperienceEndpoint]? = nil, errorMessage: String? = nil, id: String? = nil, indexId: String? = nil, name: String? = nil, roleArn: String? = nil, status: ExperienceStatus? = nil, updatedAt: Date? = nil) {
            self.configuration = configuration
            self.createdAt = createdAt
            self.description = description
            self.endpoints = endpoints
            self.errorMessage = errorMessage
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case createdAt = "CreatedAt"
            case description = "Description"
            case endpoints = "Endpoints"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeFaqRequest: AWSEncodableShape {
        /// The identifier of the FAQ you want to get information on.
        public let id: String
        /// The identifier of the index for the FAQ.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeFaqResponse: AWSDecodableShape {
        /// The Unix timestamp when the FAQ was created.
        public let createdAt: Date?
        /// The description of the FAQ that you provided when it was created.
        public let description: String?
        /// If the Status field is FAILED, the ErrorMessage field contains the reason why the FAQ failed.
        public let errorMessage: String?
        /// The file format used for the FAQ file.
        public let fileFormat: FaqFileFormat?
        /// The identifier of the FAQ.
        public let id: String?
        /// The identifier of the index for the FAQ.
        public let indexId: String?
        /// The code for a language. This shows a supported language  for the FAQ document. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that you gave the FAQ when it was created.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role that provides access  to the S3 bucket containing the FAQ file.
        public let roleArn: String?
        public let s3Path: S3Path?
        /// The status of the FAQ. It is ready to use when the status is ACTIVE.
        public let status: FaqStatus?
        /// The Unix timestamp when the FAQ was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileFormat: FaqFileFormat? = nil, id: String? = nil, indexId: String? = nil, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, s3Path: S3Path? = nil, status: FaqStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileFormat = fileFormat
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.s3Path = s3Path
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileFormat = "FileFormat"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case s3Path = "S3Path"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeFeaturedResultsSetRequest: AWSEncodableShape {
        /// The identifier of the set of featured results that you want to get  information on.
        public let featuredResultsSetId: String
        /// The identifier of the index used for featuring results.
        public let indexId: String

        @inlinable
        public init(featuredResultsSetId: String, indexId: String) {
            self.featuredResultsSetId = featuredResultsSetId
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, max: 36)
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, min: 36)
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, pattern: "^[a-zA-Z-0-9]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case featuredResultsSetId = "FeaturedResultsSetId"
            case indexId = "IndexId"
        }
    }

    public struct DescribeFeaturedResultsSetResponse: AWSDecodableShape {
        /// The Unix timestamp when the set of the featured results was created.
        public let creationTimestamp: Int64?
        /// The description for the set of featured results.
        public let description: String?
        /// The list of document IDs that don't exist but you have specified as featured  documents. Amazon Kendra cannot feature these documents if they don't exist  in the index. You can check the status of a document and its ID or check for  documents with status errors using the BatchGetDocumentStatus API.
        public let featuredDocumentsMissing: [FeaturedDocumentMissing]?
        /// The list of document IDs for the documents you want to feature with their  metadata information. For more information on the list of featured documents,  see FeaturedResultsSet.
        public let featuredDocumentsWithMetadata: [FeaturedDocumentWithMetadata]?
        /// The identifier of the set of featured results.
        public let featuredResultsSetId: String?
        /// The name for the set of featured results.
        public let featuredResultsSetName: String?
        /// The timestamp when the set of featured results was last updated.
        public let lastUpdatedTimestamp: Int64?
        /// The list of queries for featuring results. For more information on the  list of queries, see FeaturedResultsSet.
        public let queryTexts: [String]?
        /// The current status of the set of featured results. When the value is  ACTIVE, featured results are ready for use. You can still  configure your settings before setting the status to ACTIVE.  You can set the status to ACTIVE or INACTIVE  using the UpdateFeaturedResultsSet API. The queries you specify for  featured results must be unique per featured results set for each index,  whether the status is ACTIVE or INACTIVE.
        public let status: FeaturedResultsSetStatus?

        @inlinable
        public init(creationTimestamp: Int64? = nil, description: String? = nil, featuredDocumentsMissing: [FeaturedDocumentMissing]? = nil, featuredDocumentsWithMetadata: [FeaturedDocumentWithMetadata]? = nil, featuredResultsSetId: String? = nil, featuredResultsSetName: String? = nil, lastUpdatedTimestamp: Int64? = nil, queryTexts: [String]? = nil, status: FeaturedResultsSetStatus? = nil) {
            self.creationTimestamp = creationTimestamp
            self.description = description
            self.featuredDocumentsMissing = featuredDocumentsMissing
            self.featuredDocumentsWithMetadata = featuredDocumentsWithMetadata
            self.featuredResultsSetId = featuredResultsSetId
            self.featuredResultsSetName = featuredResultsSetName
            self.lastUpdatedTimestamp = lastUpdatedTimestamp
            self.queryTexts = queryTexts
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTimestamp = "CreationTimestamp"
            case description = "Description"
            case featuredDocumentsMissing = "FeaturedDocumentsMissing"
            case featuredDocumentsWithMetadata = "FeaturedDocumentsWithMetadata"
            case featuredResultsSetId = "FeaturedResultsSetId"
            case featuredResultsSetName = "FeaturedResultsSetName"
            case lastUpdatedTimestamp = "LastUpdatedTimestamp"
            case queryTexts = "QueryTexts"
            case status = "Status"
        }
    }

    public struct DescribeIndexRequest: AWSEncodableShape {
        /// The identifier of the index you want to get information on.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct DescribeIndexResponse: AWSDecodableShape {
        /// For Enterprise Edition indexes, you can choose to use additional capacity to meet the needs of your application. This contains the capacity units used for the index. A query or document storage capacity of zero indicates that the index is using the default capacity. For more information on the default capacity for an index and adjusting this, see Adjusting capacity.
        public let capacityUnits: CapacityUnitsConfiguration?
        /// The Unix timestamp when the index was created.
        public let createdAt: Date?
        /// The description for the index.
        public let description: String?
        /// Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document.
        public let documentMetadataConfigurations: [DocumentMetadataConfiguration]?
        /// The Amazon Kendra edition used for the index. You decide the edition when you create the index.
        public let edition: IndexEdition?
        /// When the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
        public let errorMessage: String?
        /// The identifier of the index.
        public let id: String?
        /// Provides information about the number of FAQ questions and answers and the number of text documents indexed.
        public let indexStatistics: IndexStatistics?
        /// The name of the index.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role that gives Amazon Kendra permission to write to your Amazon CloudWatch logs.
        public let roleArn: String?
        /// The identifier of the KMS customer master key (CMK) that is used to encrypt your data. Amazon Kendra doesn't support asymmetric CMKs.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration?
        /// The current status of the index. When the value is ACTIVE, the index is ready for use. If the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
        public let status: IndexStatus?
        /// The Unix timestamp when the index was last updated.
        public let updatedAt: Date?
        /// The user context policy for the Amazon Kendra index.
        public let userContextPolicy: UserContextPolicy?
        /// Whether you have enabled IAM Identity Center identity source for your users and groups. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration for the Amazon Kendra index.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        @inlinable
        public init(capacityUnits: CapacityUnitsConfiguration? = nil, createdAt: Date? = nil, description: String? = nil, documentMetadataConfigurations: [DocumentMetadataConfiguration]? = nil, edition: IndexEdition? = nil, errorMessage: String? = nil, id: String? = nil, indexStatistics: IndexStatistics? = nil, name: String? = nil, roleArn: String? = nil, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil, status: IndexStatus? = nil, updatedAt: Date? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.capacityUnits = capacityUnits
            self.createdAt = createdAt
            self.description = description
            self.documentMetadataConfigurations = documentMetadataConfigurations
            self.edition = edition
            self.errorMessage = errorMessage
            self.id = id
            self.indexStatistics = indexStatistics
            self.name = name
            self.roleArn = roleArn
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.status = status
            self.updatedAt = updatedAt
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case capacityUnits = "CapacityUnits"
            case createdAt = "CreatedAt"
            case description = "Description"
            case documentMetadataConfigurations = "DocumentMetadataConfigurations"
            case edition = "Edition"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexStatistics = "IndexStatistics"
            case name = "Name"
            case roleArn = "RoleArn"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case status = "Status"
            case updatedAt = "UpdatedAt"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct DescribePrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source to check the processing of PUT and DELETE actions for mapping users to their groups.
        public let dataSourceId: String?
        /// The identifier of the group required to check the processing of PUT and DELETE actions for mapping users to their groups.
        public let groupId: String
        /// The identifier of the index required to check the processing of PUT and DELETE actions for mapping users to their groups.
        public let indexId: String

        @inlinable
        public init(dataSourceId: String? = nil, groupId: String, indexId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case indexId = "IndexId"
        }
    }

    public struct DescribePrincipalMappingResponse: AWSDecodableShape {
        /// Shows the identifier of the data source to see information on the processing of PUT and DELETE actions for mapping users to their groups.
        public let dataSourceId: String?
        /// Shows the identifier of the group to see information on the processing of PUT and DELETE actions for mapping users to their groups.
        public let groupId: String?
        /// Shows the following information on the processing of PUT and DELETE actions for mapping users to their groups:   Status—the status can be either PROCESSING, SUCCEEDED, DELETING, DELETED, or FAILED.   Last updated—the last date-time an action was updated.   Received—the last date-time an action was received or submitted.   Ordering ID—the latest action that should process and apply after other actions.   Failure reason—the reason an action could not be processed.
        public let groupOrderingIdSummaries: [GroupOrderingIdSummary]?
        /// Shows the identifier of the index to see information on the processing of PUT and DELETE actions for mapping users to their groups.
        public let indexId: String?

        @inlinable
        public init(dataSourceId: String? = nil, groupId: String? = nil, groupOrderingIdSummaries: [GroupOrderingIdSummary]? = nil, indexId: String? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.groupOrderingIdSummaries = groupOrderingIdSummaries
            self.indexId = indexId
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case groupOrderingIdSummaries = "GroupOrderingIdSummaries"
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// The identifier of the block list you want to get information on.
        public let id: String
        /// The identifier of the index for the block list.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsBlockListResponse: AWSDecodableShape {
        /// The Unix timestamp when a block list for query suggestions was created.
        public let createdAt: Date?
        /// The description for the block list.
        public let description: String?
        /// The error message containing details if there are issues processing  the block list.
        public let errorMessage: String?
        /// The current size of the block list text file in S3.
        public let fileSizeBytes: Int64?
        /// The identifier of the block list.
        public let id: String?
        /// The identifier of the index for the block list.
        public let indexId: String?
        /// The current number of valid, non-empty words or phrases in  the block list text file.
        public let itemCount: Int?
        /// The name of the block list.
        public let name: String?
        /// The IAM (Identity and Access Management) role used by  Amazon Kendra to access the block list text file in S3. The role needs S3 read permissions to your file in S3 and needs to  give STS (Security Token Service) assume role permissions to  Amazon Kendra.
        public let roleArn: String?
        /// Shows the current S3 path to your block list text file in your S3 bucket. Each block word or phrase should be on a separate line in a text file. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let sourceS3Path: S3Path?
        /// The current status of the block list. When the value is  ACTIVE, the block list is ready for use.
        public let status: QuerySuggestionsBlockListStatus?
        /// The Unix timestamp when a block list for query suggestions was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileSizeBytes: Int64? = nil, id: String? = nil, indexId: String? = nil, itemCount: Int? = nil, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil, status: QuerySuggestionsBlockListStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileSizeBytes = fileSizeBytes
            self.id = id
            self.indexId = indexId
            self.itemCount = itemCount
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileSizeBytes = "FileSizeBytes"
            case id = "Id"
            case indexId = "IndexId"
            case itemCount = "ItemCount"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeQuerySuggestionsConfigRequest: AWSEncodableShape {
        /// The identifier of the index with query suggestions that you want to get  information on.
        public let indexId: String

        @inlinable
        public init(indexId: String) {
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsConfigResponse: AWSDecodableShape {
        /// Configuration information for the document fields/attributes that you want to base query  suggestions on.
        public let attributeSuggestionsConfig: AttributeSuggestionsDescribeConfig?
        ///  TRUE to use all queries, otherwise use only queries that include  user information to generate the query suggestions.
        public let includeQueriesWithoutUserInformation: Bool?
        /// The Unix timestamp when query suggestions for an index was last cleared. After you clear suggestions, Amazon Kendra learns new suggestions based  on new queries added to the query log from the time you cleared suggestions.  Amazon Kendra only considers re-occurences of a query from the time you cleared  suggestions.
        public let lastClearTime: Date?
        /// The Unix timestamp when query suggestions for an index was last updated. Amazon Kendra automatically updates suggestions every 24 hours, after you  change a setting or after you apply a block list.
        public let lastSuggestionsBuildTime: Date?
        /// The minimum number of unique users who must search a query in  order for the query to be eligible to suggest to your users.
        public let minimumNumberOfQueryingUsers: Int?
        /// The minimum number of times a query must be searched in order for  the query to be eligible to suggest to your users.
        public let minimumQueryCount: Int?
        /// Whether query suggestions are currently in  ENABLED mode or LEARN_ONLY mode. By default, Amazon Kendra enables query suggestions.LEARN_ONLY  turns off query suggestions for your users. You can change the mode using  the UpdateQuerySuggestionsConfig  API.
        public let mode: Mode?
        /// How recent your queries are in your query log time  window (in days).
        public let queryLogLookBackWindowInDays: Int?
        /// Whether the status of query suggestions settings is currently  ACTIVE or UPDATING. Active means the current settings apply and Updating means your  changed settings are in the process of applying.
        public let status: QuerySuggestionsStatus?
        /// The current total count of query suggestions for an index. This count can change when you update your query suggestions settings,  if you filter out certain queries from suggestions using a block list,  and as the query log accumulates more queries for Amazon Kendra to learn from. If the count is much lower than you expected, it could be because Amazon Kendra  needs more queries in the query history to learn from or your current query suggestions  settings are too strict.
        public let totalSuggestionsCount: Int?

        @inlinable
        public init(attributeSuggestionsConfig: AttributeSuggestionsDescribeConfig? = nil, includeQueriesWithoutUserInformation: Bool? = nil, lastClearTime: Date? = nil, lastSuggestionsBuildTime: Date? = nil, minimumNumberOfQueryingUsers: Int? = nil, minimumQueryCount: Int? = nil, mode: Mode? = nil, queryLogLookBackWindowInDays: Int? = nil, status: QuerySuggestionsStatus? = nil, totalSuggestionsCount: Int? = nil) {
            self.attributeSuggestionsConfig = attributeSuggestionsConfig
            self.includeQueriesWithoutUserInformation = includeQueriesWithoutUserInformation
            self.lastClearTime = lastClearTime
            self.lastSuggestionsBuildTime = lastSuggestionsBuildTime
            self.minimumNumberOfQueryingUsers = minimumNumberOfQueryingUsers
            self.minimumQueryCount = minimumQueryCount
            self.mode = mode
            self.queryLogLookBackWindowInDays = queryLogLookBackWindowInDays
            self.status = status
            self.totalSuggestionsCount = totalSuggestionsCount
        }

        private enum CodingKeys: String, CodingKey {
            case attributeSuggestionsConfig = "AttributeSuggestionsConfig"
            case includeQueriesWithoutUserInformation = "IncludeQueriesWithoutUserInformation"
            case lastClearTime = "LastClearTime"
            case lastSuggestionsBuildTime = "LastSuggestionsBuildTime"
            case minimumNumberOfQueryingUsers = "MinimumNumberOfQueryingUsers"
            case minimumQueryCount = "MinimumQueryCount"
            case mode = "Mode"
            case queryLogLookBackWindowInDays = "QueryLogLookBackWindowInDays"
            case status = "Status"
            case totalSuggestionsCount = "TotalSuggestionsCount"
        }
    }

    public struct DescribeThesaurusRequest: AWSEncodableShape {
        /// The identifier of the thesaurus you want to get information on.
        public let id: String
        /// The identifier of the index for the thesaurus.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeThesaurusResponse: AWSDecodableShape {
        /// The Unix timestamp when the thesaurus was created.
        public let createdAt: Date?
        /// The thesaurus description.
        public let description: String?
        /// When the Status field value is FAILED, the ErrorMessage field provides more information.
        public let errorMessage: String?
        /// The size of the thesaurus file in bytes.
        public let fileSizeBytes: Int64?
        /// The identifier of the thesaurus.
        public let id: String?
        /// The identifier of the index for the thesaurus.
        public let indexId: String?
        /// The thesaurus name.
        public let name: String?
        /// An IAM role that gives Amazon Kendra permissions  to access thesaurus file specified in SourceS3Path.
        public let roleArn: String?
        public let sourceS3Path: S3Path?
        /// The current status of the thesaurus. When the value is ACTIVE,  queries are able to use the thesaurus. If the Status field value  is FAILED, the ErrorMessage field provides more information.  If the status is ACTIVE_BUT_UPDATE_FAILED, it means that Amazon Kendra could not ingest the new thesaurus file. The old thesaurus file is still active.
        public let status: ThesaurusStatus?
        /// The number of synonym rules in the thesaurus file.
        public let synonymRuleCount: Int64?
        /// The number of unique terms in the thesaurus file. For example, the synonyms a,b,c and a=>d, the term count would be 4.
        public let termCount: Int64?
        /// The Unix timestamp when the thesaurus was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileSizeBytes: Int64? = nil, id: String? = nil, indexId: String? = nil, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil, status: ThesaurusStatus? = nil, synonymRuleCount: Int64? = nil, termCount: Int64? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileSizeBytes = fileSizeBytes
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.status = status
            self.synonymRuleCount = synonymRuleCount
            self.termCount = termCount
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileSizeBytes = "FileSizeBytes"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case status = "Status"
            case synonymRuleCount = "SynonymRuleCount"
            case termCount = "TermCount"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DisassociateEntitiesFromExperienceRequest: AWSEncodableShape {
        /// Lists users or groups in your IAM Identity Center identity source.
        public let entityList: [EntityConfiguration]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        @inlinable
        public init(entityList: [EntityConfiguration], id: String, indexId: String) {
            self.entityList = entityList
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityList.forEach {
                try $0.validate(name: "\(name).entityList[]")
            }
            try self.validate(self.entityList, name: "entityList", parent: name, max: 40)
            try self.validate(self.entityList, name: "entityList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityList = "EntityList"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DisassociateEntitiesFromExperienceResponse: AWSDecodableShape {
        /// Lists the users or groups in your IAM Identity Center identity source that  failed to properly remove access to your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        @inlinable
        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct DisassociatePersonasFromEntitiesRequest: AWSEncodableShape {
        /// The identifiers of users or groups in your IAM Identity Center identity  source. For example, user IDs could be user emails.
        public let entityIds: [String]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        @inlinable
        public init(entityIds: [String], id: String, indexId: String) {
            self.entityIds = entityIds
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityIds.forEach {
                try validate($0, name: "entityIds[]", parent: name, max: 47)
                try validate($0, name: "entityIds[]", parent: name, min: 1)
                try validate($0, name: "entityIds[]", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            }
            try self.validate(self.entityIds, name: "entityIds", parent: name, max: 25)
            try self.validate(self.entityIds, name: "entityIds", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityIds = "EntityIds"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DisassociatePersonasFromEntitiesResponse: AWSDecodableShape {
        /// Lists the users or groups in your IAM Identity Center identity source that  failed to properly remove access to your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        @inlinable
        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct Document: AWSEncodableShape {
        /// The identifier of the access control configuration that you want to apply to the document.
        public let accessControlConfigurationId: String?
        /// Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
        public let accessControlList: [Principal]?
        /// Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response. For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
        public let attributes: [DocumentAttribute]?
        /// The contents of the document.  Documents passed to the Blob parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
        public let blob: AWSBase64Data?
        /// The file type of the document in the Blob field. If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the HTML start and closing tags (content) around the content.
        public let contentType: ContentType?
        /// The list of principal lists that define the hierarchy for which documents users should have access to.
        public let hierarchicalAccessControlList: [HierarchicalPrincipal]?
        /// A identifier of the document in the index. Note, each document ID must be unique per index. You cannot create a data source to index your documents with their unique IDs and then use the BatchPutDocument API to index the same documents, or vice versa. You can delete a data source and then use the BatchPutDocument API to index the same documents, or vice versa.
        public let id: String
        public let s3Path: S3Path?
        /// The title of the document.
        public let title: String?

        @inlinable
        public init(accessControlConfigurationId: String? = nil, accessControlList: [Principal]? = nil, attributes: [DocumentAttribute]? = nil, blob: AWSBase64Data? = nil, contentType: ContentType? = nil, hierarchicalAccessControlList: [HierarchicalPrincipal]? = nil, id: String, s3Path: S3Path? = nil, title: String? = nil) {
            self.accessControlConfigurationId = accessControlConfigurationId
            self.accessControlList = accessControlList
            self.attributes = attributes
            self.blob = blob
            self.contentType = contentType
            self.hierarchicalAccessControlList = hierarchicalAccessControlList
            self.id = id
            self.s3Path = s3Path
            self.title = title
        }

        public func validate(name: String) throws {
            try self.validate(self.accessControlConfigurationId, name: "accessControlConfigurationId", parent: name, max: 36)
            try self.validate(self.accessControlConfigurationId, name: "accessControlConfigurationId", parent: name, min: 1)
            try self.validate(self.accessControlConfigurationId, name: "accessControlConfigurationId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.accessControlList?.forEach {
                try $0.validate(name: "\(name).accessControlList[]")
            }
            try self.attributes?.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.hierarchicalAccessControlList?.forEach {
                try $0.validate(name: "\(name).hierarchicalAccessControlList[]")
            }
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, max: 30)
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 2048)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.s3Path?.validate(name: "\(name).s3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlConfigurationId = "AccessControlConfigurationId"
            case accessControlList = "AccessControlList"
            case attributes = "Attributes"
            case blob = "Blob"
            case contentType = "ContentType"
            case hierarchicalAccessControlList = "HierarchicalAccessControlList"
            case id = "Id"
            case s3Path = "S3Path"
            case title = "Title"
        }
    }

    public struct DocumentAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the attribute.
        public let key: String
        /// The value of the attribute.
        public let value: DocumentAttributeValue

        @inlinable
        public init(key: String, value: DocumentAttributeValue) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 200)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.value.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct DocumentAttributeCondition: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the document attribute used for the condition. For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents. Amazon Kendra currently does not support _document_body as an attribute key used for the condition.
        public let conditionDocumentAttributeKey: String
        /// The value used by the operator. For example, you can specify the value 'financial' for strings in the 'Source_URI' field that partially match or contain this value.
        public let conditionOnValue: DocumentAttributeValue?
        /// The condition operator. For example, you can use 'Contains' to partially match a string.
        public let `operator`: ConditionOperator

        @inlinable
        public init(conditionDocumentAttributeKey: String, conditionOnValue: DocumentAttributeValue? = nil, operator: ConditionOperator) {
            self.conditionDocumentAttributeKey = conditionDocumentAttributeKey
            self.conditionOnValue = conditionOnValue
            self.`operator` = `operator`
        }

        public func validate(name: String) throws {
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, max: 200)
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, min: 1)
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.conditionOnValue?.validate(name: "\(name).conditionOnValue")
        }

        private enum CodingKeys: String, CodingKey {
            case conditionDocumentAttributeKey = "ConditionDocumentAttributeKey"
            case conditionOnValue = "ConditionOnValue"
            case `operator` = "Operator"
        }
    }

    public struct DocumentAttributeTarget: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.
        public let targetDocumentAttributeKey: String?
        /// The target value you want to create for the target attribute. For example, 'Finance' could be the target value for the target attribute key 'Department'.
        public let targetDocumentAttributeValue: DocumentAttributeValue?
        ///  TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE. To create a target value (TargetDocumentAttributeValue), set this to FALSE.
        public let targetDocumentAttributeValueDeletion: Bool?

        @inlinable
        public init(targetDocumentAttributeKey: String? = nil, targetDocumentAttributeValue: DocumentAttributeValue? = nil, targetDocumentAttributeValueDeletion: Bool? = nil) {
            self.targetDocumentAttributeKey = targetDocumentAttributeKey
            self.targetDocumentAttributeValue = targetDocumentAttributeValue
            self.targetDocumentAttributeValueDeletion = targetDocumentAttributeValueDeletion
        }

        public func validate(name: String) throws {
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, max: 200)
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, min: 1)
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.targetDocumentAttributeValue?.validate(name: "\(name).targetDocumentAttributeValue")
        }

        private enum CodingKeys: String, CodingKey {
            case targetDocumentAttributeKey = "TargetDocumentAttributeKey"
            case targetDocumentAttributeValue = "TargetDocumentAttributeValue"
            case targetDocumentAttributeValueDeletion = "TargetDocumentAttributeValueDeletion"
        }
    }

    public struct DocumentAttributeValue: AWSEncodableShape & AWSDecodableShape {
        /// A date expressed as an ISO 8601 string. It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
        public let dateValue: Date?
        /// A long integer value.
        public let longValue: Int64?
        /// A list of strings. The default maximum length or number of strings is 10.
        public let stringListValue: [String]?
        /// A string, such as "department".
        public let stringValue: String?

        @inlinable
        public init(dateValue: Date? = nil, longValue: Int64? = nil, stringListValue: [String]? = nil, stringValue: String? = nil) {
            self.dateValue = dateValue
            self.longValue = longValue
            self.stringListValue = stringListValue
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.stringListValue?.forEach {
                try validate($0, name: "stringListValue[]", parent: name, max: 2048)
                try validate($0, name: "stringListValue[]", parent: name, min: 1)
            }
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 2048)
            try self.validate(self.stringValue, name: "stringValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dateValue = "DateValue"
            case longValue = "LongValue"
            case stringListValue = "StringListValue"
            case stringValue = "StringValue"
        }
    }

    public struct DocumentAttributeValueCountPair: AWSDecodableShape {
        /// The number of documents in the response that have the attribute/field value for the key.
        public let count: Int?
        /// The value of the attribute/field. For example, "HR".
        public let documentAttributeValue: DocumentAttributeValue?
        /// Contains the results of a document attribute/field that is a nested facet. A FacetResult contains the counts for each facet nested within a facet. For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. The counts for documents that belong to "Frontend" and "Backend" within "Engineering" are returned for a query.
        public let facetResults: [FacetResult]?

        @inlinable
        public init(count: Int? = nil, documentAttributeValue: DocumentAttributeValue? = nil, facetResults: [FacetResult]? = nil) {
            self.count = count
            self.documentAttributeValue = documentAttributeValue
            self.facetResults = facetResults
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
            case documentAttributeValue = "DocumentAttributeValue"
            case facetResults = "FacetResults"
        }
    }

    public struct DocumentInfo: AWSEncodableShape {
        /// Attributes that identify a specific version of a document to check. The only valid attributes are:   version   datasourceId   jobExecutionId   The attributes follow these rules:    dataSourceId and jobExecutionId must be used together.    version is ignored if dataSourceId and jobExecutionId are not provided.   If dataSourceId and jobExecutionId are provided, but version is not, the version defaults to "0".
        public let attributes: [DocumentAttribute]?
        /// The identifier of the document.
        public let documentId: String

        @inlinable
        public init(attributes: [DocumentAttribute]? = nil, documentId: String) {
            self.attributes = attributes
            self.documentId = documentId
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.validate(self.documentId, name: "documentId", parent: name, max: 2048)
            try self.validate(self.documentId, name: "documentId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case documentId = "DocumentId"
        }
    }

    public struct DocumentMetadataConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the index field.
        public let name: String
        /// Provides tuning parameters to determine how the field affects the search results.
        public let relevance: Relevance?
        /// Provides information about how the field is used during a search.
        public let search: Search?
        /// The data type of the index field.
        public let type: DocumentAttributeValueType

        @inlinable
        public init(name: String, relevance: Relevance? = nil, search: Search? = nil, type: DocumentAttributeValueType) {
            self.name = name
            self.relevance = relevance
            self.search = search
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 30)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.relevance?.validate(name: "\(name).relevance")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case relevance = "Relevance"
            case search = "Search"
            case type = "Type"
        }
    }

    public struct DocumentRelevanceConfiguration: AWSEncodableShape {
        /// The name of the index field.
        public let name: String
        /// Provides information for tuning the relevance of a field in a search. When a query includes terms that match the field, the results are given a boost in the response based on these tuning parameters.
        public let relevance: Relevance

        @inlinable
        public init(name: String, relevance: Relevance) {
            self.name = name
            self.relevance = relevance
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 30)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.relevance.validate(name: "\(name).relevance")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case relevance = "Relevance"
        }
    }

    public struct DocumentsMetadataConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A prefix used to filter metadata configuration files in the Amazon Web Services S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
        public let s3Prefix: String?

        @inlinable
        public init(s3Prefix: String? = nil) {
            self.s3Prefix = s3Prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Prefix, name: "s3Prefix", parent: name, max: 1024)
            try self.validate(self.s3Prefix, name: "s3Prefix", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case s3Prefix = "S3Prefix"
        }
    }

    public struct EntityConfiguration: AWSEncodableShape {
        /// The identifier of a user or group in your IAM Identity Center identity  source. For example, a user ID could be an email.
        public let entityId: String
        /// Specifies whether you are configuring a User or a Group.
        public let entityType: EntityType

        @inlinable
        public init(entityId: String, entityType: EntityType) {
            self.entityId = entityId
            self.entityType = entityType
        }

        public func validate(name: String) throws {
            try self.validate(self.entityId, name: "entityId", parent: name, max: 47)
            try self.validate(self.entityId, name: "entityId", parent: name, min: 1)
            try self.validate(self.entityId, name: "entityId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case entityType = "EntityType"
        }
    }

    public struct EntityDisplayData: AWSDecodableShape {
        /// The first name of the user.
        public let firstName: String?
        /// The name of the group.
        public let groupName: String?
        /// The user name of the user.
        public let identifiedUserName: String?
        /// The last name of the user.
        public let lastName: String?
        /// The name of the user.
        public let userName: String?

        @inlinable
        public init(firstName: String? = nil, groupName: String? = nil, identifiedUserName: String? = nil, lastName: String? = nil, userName: String? = nil) {
            self.firstName = firstName
            self.groupName = groupName
            self.identifiedUserName = identifiedUserName
            self.lastName = lastName
            self.userName = userName
        }

        private enum CodingKeys: String, CodingKey {
            case firstName = "FirstName"
            case groupName = "GroupName"
            case identifiedUserName = "IdentifiedUserName"
            case lastName = "LastName"
            case userName = "UserName"
        }
    }

    public struct EntityPersonaConfiguration: AWSEncodableShape {
        /// The identifier of a user or group in your IAM Identity Center identity  source. For example, a user ID could be an email.
        public let entityId: String
        /// The persona that defines the specific permissions of the user or group  in your IAM Identity Center identity source. The available personas or  access roles are Owner and Viewer. For more  information on these personas, see Providing  access to your search page.
        public let persona: Persona

        @inlinable
        public init(entityId: String, persona: Persona) {
            self.entityId = entityId
            self.persona = persona
        }

        public func validate(name: String) throws {
            try self.validate(self.entityId, name: "entityId", parent: name, max: 47)
            try self.validate(self.entityId, name: "entityId", parent: name, min: 1)
            try self.validate(self.entityId, name: "entityId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case persona = "Persona"
        }
    }

    public struct ExpandConfiguration: AWSEncodableShape {
        /// The number of expanded results to show per collapsed primary document. For instance, if you set this value to 3, then at most 3 results per collapsed group will be displayed.
        public let maxExpandedResultsPerItem: Int?
        /// The number of collapsed search result groups to expand. If you set this value to 10, for example, only the first 10 out of 100 result groups will have expand functionality.
        public let maxResultItemsToExpand: Int?

        @inlinable
        public init(maxExpandedResultsPerItem: Int? = nil, maxResultItemsToExpand: Int? = nil) {
            self.maxExpandedResultsPerItem = maxExpandedResultsPerItem
            self.maxResultItemsToExpand = maxResultItemsToExpand
        }

        private enum CodingKeys: String, CodingKey {
            case maxExpandedResultsPerItem = "MaxExpandedResultsPerItem"
            case maxResultItemsToExpand = "MaxResultItemsToExpand"
        }
    }

    public struct ExpandedResultItem: AWSDecodableShape {
        /// An array of document attributes assigned to a document in the search results. For example, the document author ("_author") or the source URI ("_source_uri") of the document.
        public let documentAttributes: [DocumentAttribute]?
        public let documentExcerpt: TextWithHighlights?
        /// The idenitifier of the document.
        public let documentId: String?
        public let documentTitle: TextWithHighlights?
        /// The URI of the original location of the document.
        public let documentURI: String?
        /// The identifier for the expanded result.
        public let id: String?

        @inlinable
        public init(documentAttributes: [DocumentAttribute]? = nil, documentExcerpt: TextWithHighlights? = nil, documentId: String? = nil, documentTitle: TextWithHighlights? = nil, documentURI: String? = nil, id: String? = nil) {
            self.documentAttributes = documentAttributes
            self.documentExcerpt = documentExcerpt
            self.documentId = documentId
            self.documentTitle = documentTitle
            self.documentURI = documentURI
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributes = "DocumentAttributes"
            case documentExcerpt = "DocumentExcerpt"
            case documentId = "DocumentId"
            case documentTitle = "DocumentTitle"
            case documentURI = "DocumentURI"
            case id = "Id"
        }
    }

    public struct ExperienceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifiers of your data sources and FAQs. Or, you can specify  that you want to use documents indexed via the BatchPutDocument  API. This is the content you want to use for your Amazon Kendra experience.
        public let contentSourceConfiguration: ContentSourceConfiguration?
        /// The IAM Identity Center field name that contains the identifiers of your users,  such as their emails.
        public let userIdentityConfiguration: UserIdentityConfiguration?

        @inlinable
        public init(contentSourceConfiguration: ContentSourceConfiguration? = nil, userIdentityConfiguration: UserIdentityConfiguration? = nil) {
            self.contentSourceConfiguration = contentSourceConfiguration
            self.userIdentityConfiguration = userIdentityConfiguration
        }

        public func validate(name: String) throws {
            try self.contentSourceConfiguration?.validate(name: "\(name).contentSourceConfiguration")
            try self.userIdentityConfiguration?.validate(name: "\(name).userIdentityConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case contentSourceConfiguration = "ContentSourceConfiguration"
            case userIdentityConfiguration = "UserIdentityConfiguration"
        }
    }

    public struct ExperienceEndpoint: AWSDecodableShape {
        /// The endpoint of your Amazon Kendra experience.
        public let endpoint: String?
        /// The type of endpoint for your Amazon Kendra experience. The type currently available  is HOME, which is a unique and fully hosted URL to the home page  of your Amazon Kendra experience.
        public let endpointType: EndpointType?

        @inlinable
        public init(endpoint: String? = nil, endpointType: EndpointType? = nil) {
            self.endpoint = endpoint
            self.endpointType = endpointType
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint = "Endpoint"
            case endpointType = "EndpointType"
        }
    }

    public struct ExperienceEntitiesSummary: AWSDecodableShape {
        /// Information about the user entity.
        public let displayData: EntityDisplayData?
        /// The identifier of a user or group in your IAM Identity Center identity source.  For example, a user ID could be an email.
        public let entityId: String?
        /// Shows the type as User or Group.
        public let entityType: EntityType?

        @inlinable
        public init(displayData: EntityDisplayData? = nil, entityId: String? = nil, entityType: EntityType? = nil) {
            self.displayData = displayData
            self.entityId = entityId
            self.entityType = entityType
        }

        private enum CodingKeys: String, CodingKey {
            case displayData = "DisplayData"
            case entityId = "EntityId"
            case entityType = "EntityType"
        }
    }

    public struct ExperiencesSummary: AWSDecodableShape {
        /// The Unix timestamp when your Amazon Kendra experience was created.
        public let createdAt: Date?
        /// The endpoint URLs for your Amazon Kendra experiences. The URLs are unique  and fully hosted by Amazon Web Services.
        public let endpoints: [ExperienceEndpoint]?
        /// The identifier of your Amazon Kendra experience.
        public let id: String?
        /// The name of your Amazon Kendra experience.
        public let name: String?
        /// The processing status of your Amazon Kendra experience.
        public let status: ExperienceStatus?

        @inlinable
        public init(createdAt: Date? = nil, endpoints: [ExperienceEndpoint]? = nil, id: String? = nil, name: String? = nil, status: ExperienceStatus? = nil) {
            self.createdAt = createdAt
            self.endpoints = endpoints
            self.id = id
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case endpoints = "Endpoints"
            case id = "Id"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct Facet: AWSEncodableShape {
        /// The unique key for the document attribute.
        public let documentAttributeKey: String?
        /// An array of document attributes that are nested facets within a facet. For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. This helps your users further narrow their search. You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
        public let facets: [Facet]?
        /// Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact Support.
        public let maxResults: Int?

        @inlinable
        public init(documentAttributeKey: String? = nil, facets: [Facet]? = nil, maxResults: Int? = nil) {
            self.documentAttributeKey = documentAttributeKey
            self.facets = facets
            self.maxResults = maxResults
        }

        public func validate(name: String) throws {
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, max: 200)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, min: 1)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.facets?.forEach {
                try $0.validate(name: "\(name).facets[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 5000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case facets = "Facets"
            case maxResults = "MaxResults"
        }
    }

    public struct FacetResult: AWSDecodableShape {
        /// The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.
        public let documentAttributeKey: String?
        /// An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
        public let documentAttributeValueCountPairs: [DocumentAttributeValueCountPair]?
        /// The data type of the facet value. This is the same as the type defined for the index field when it was created.
        public let documentAttributeValueType: DocumentAttributeValueType?

        @inlinable
        public init(documentAttributeKey: String? = nil, documentAttributeValueCountPairs: [DocumentAttributeValueCountPair]? = nil, documentAttributeValueType: DocumentAttributeValueType? = nil) {
            self.documentAttributeKey = documentAttributeKey
            self.documentAttributeValueCountPairs = documentAttributeValueCountPairs
            self.documentAttributeValueType = documentAttributeValueType
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case documentAttributeValueCountPairs = "DocumentAttributeValueCountPairs"
            case documentAttributeValueType = "DocumentAttributeValueType"
        }
    }

    public struct FailedEntity: AWSDecodableShape {
        /// The identifier of the user or group in your IAM Identity Center identity  source. For example, a user ID could be an email.
        public let entityId: String?
        /// The reason the user or group in your IAM Identity Center identity source  failed to properly configure with your Amazon Kendra experience.
        public let errorMessage: String?

        @inlinable
        public init(entityId: String? = nil, errorMessage: String? = nil) {
            self.entityId = entityId
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct FaqStatistics: AWSDecodableShape {
        /// The total number of FAQ questions and answers for an index.
        public let indexedQuestionAnswersCount: Int

        @inlinable
        public init(indexedQuestionAnswersCount: Int) {
            self.indexedQuestionAnswersCount = indexedQuestionAnswersCount
        }

        private enum CodingKeys: String, CodingKey {
            case indexedQuestionAnswersCount = "IndexedQuestionAnswersCount"
        }
    }

    public struct FaqSummary: AWSDecodableShape {
        /// The Unix timestamp when the FAQ was created.
        public let createdAt: Date?
        /// The file type used to create the FAQ.
        public let fileFormat: FaqFileFormat?
        /// The identifier of the FAQ.
        public let id: String?
        /// The code for a language. This shows a supported language for the FAQ document  as part of the summary information for FAQs. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that you assigned the FAQ when you created or updated the FAQ.
        public let name: String?
        /// The current status of the FAQ. When the status is ACTIVE the FAQ is ready for use.
        public let status: FaqStatus?
        /// The Unix timestamp when the FAQ was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, fileFormat: FaqFileFormat? = nil, id: String? = nil, languageCode: String? = nil, name: String? = nil, status: FaqStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.fileFormat = fileFormat
            self.id = id
            self.languageCode = languageCode
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case fileFormat = "FileFormat"
            case id = "Id"
            case languageCode = "LanguageCode"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct FeaturedDocument: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the document to feature in the search results. You can  use the Query API to search for  specific documents with their document IDs included in the result items,  or you can use the console.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 2048)
            try self.validate(self.id, name: "id", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct FeaturedDocumentMissing: AWSDecodableShape {
        /// The identifier of the document that doesn't exist but you have specified  as a featured document.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct FeaturedDocumentWithMetadata: AWSDecodableShape {
        /// The identifier of the featured document with its metadata. You can use  the Query API to search for  specific documents with their document IDs included in the result items,  or you can use the console.
        public let id: String?
        /// The main title of the featured document.
        public let title: String?
        /// The source URI location of the featured document.
        public let uri: String?

        @inlinable
        public init(id: String? = nil, title: String? = nil, uri: String? = nil) {
            self.id = id
            self.title = title
            self.uri = uri
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case title = "Title"
            case uri = "URI"
        }
    }

    public struct FeaturedResultsConflictException: AWSErrorShape {
        /// A list of the conflicting queries, including the query text, the name for  the featured results set, and the identifier of the featured results set.
        public let conflictingItems: [ConflictingItem]?
        /// An explanation for the conflicting queries.
        public let message: String?

        @inlinable
        public init(conflictingItems: [ConflictingItem]? = nil, message: String? = nil) {
            self.conflictingItems = conflictingItems
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case conflictingItems = "ConflictingItems"
            case message = "Message"
        }
    }

    public struct FeaturedResultsItem: AWSDecodableShape {
        /// One or more additional attributes associated with the featured result.
        public let additionalAttributes: [AdditionalResultAttribute]?
        /// An array of document attributes assigned to a featured document in the  search results. For example, the document author (_author) or  the source URI (_source_uri) of the document.
        public let documentAttributes: [DocumentAttribute]?
        public let documentExcerpt: TextWithHighlights?
        /// The identifier of the featured document.
        public let documentId: String?
        public let documentTitle: TextWithHighlights?
        /// The source URI location of the featured document.
        public let documentURI: String?
        /// A token that identifies a particular featured result from a particular  query. Use this token to provide click-through feedback for the result.  For more information, see Submitting feedback.
        public let feedbackToken: String?
        /// The identifier of the featured result.
        public let id: String?
        /// The type of document within the featured result response. For example,  a response could include a question-answer type that's relevant to the  query.
        public let type: QueryResultType?

        @inlinable
        public init(additionalAttributes: [AdditionalResultAttribute]? = nil, documentAttributes: [DocumentAttribute]? = nil, documentExcerpt: TextWithHighlights? = nil, documentId: String? = nil, documentTitle: TextWithHighlights? = nil, documentURI: String? = nil, feedbackToken: String? = nil, id: String? = nil, type: QueryResultType? = nil) {
            self.additionalAttributes = additionalAttributes
            self.documentAttributes = documentAttributes
            self.documentExcerpt = documentExcerpt
            self.documentId = documentId
            self.documentTitle = documentTitle
            self.documentURI = documentURI
            self.feedbackToken = feedbackToken
            self.id = id
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case additionalAttributes = "AdditionalAttributes"
            case documentAttributes = "DocumentAttributes"
            case documentExcerpt = "DocumentExcerpt"
            case documentId = "DocumentId"
            case documentTitle = "DocumentTitle"
            case documentURI = "DocumentURI"
            case feedbackToken = "FeedbackToken"
            case id = "Id"
            case type = "Type"
        }
    }

    public struct FeaturedResultsSet: AWSDecodableShape {
        /// The Unix timestamp when the set of featured results was created.
        public let creationTimestamp: Int64?
        /// The description for the set of featured results.
        public let description: String?
        /// The list of document IDs for the documents you want to feature at the  top of the search results page. You can use the Query API to search for  specific documents with their document IDs included in the result items,  or you can use the console. You can add up to four featured documents. You can request to increase this  limit by contacting Support. Specific queries are mapped to specific documents for featuring in the  results. If a query contains an exact match, then one or more specific  documents are featured in the results. The exact match applies to the full  query. For example, if you only specify 'Kendra', queries such as 'How does  kendra semantically rank results?' will not render the featured results.  Featured results are designed for specific queries, rather than queries  that are too broad in scope.
        public let featuredDocuments: [FeaturedDocument]?
        /// The identifier of the set of featured results.
        public let featuredResultsSetId: String?
        /// The name for the set of featured results.
        public let featuredResultsSetName: String?
        /// The Unix timestamp when the set of featured results was last updated.
        public let lastUpdatedTimestamp: Int64?
        /// The list of queries for featuring results. Specific queries are mapped to specific documents for featuring in  the results. If a query contains an exact match, then one or more  specific documents are featured in the results. The exact match applies  to the full query. For example, if you only specify 'Kendra', queries  such as 'How does kendra semantically rank results?' will not render the  featured results. Featured results are designed for specific queries,  rather than queries that are too broad in scope.
        public let queryTexts: [String]?
        /// The current status of the set of featured results. When the value is  ACTIVE, featured results are ready for use. You can still  configure your settings before setting the status to ACTIVE.  You can set the status to ACTIVE or INACTIVE  using the UpdateFeaturedResultsSet API. The queries you specify for  featured results must be unique per featured results set for each index,  whether the status is ACTIVE or INACTIVE.
        public let status: FeaturedResultsSetStatus?

        @inlinable
        public init(creationTimestamp: Int64? = nil, description: String? = nil, featuredDocuments: [FeaturedDocument]? = nil, featuredResultsSetId: String? = nil, featuredResultsSetName: String? = nil, lastUpdatedTimestamp: Int64? = nil, queryTexts: [String]? = nil, status: FeaturedResultsSetStatus? = nil) {
            self.creationTimestamp = creationTimestamp
            self.description = description
            self.featuredDocuments = featuredDocuments
            self.featuredResultsSetId = featuredResultsSetId
            self.featuredResultsSetName = featuredResultsSetName
            self.lastUpdatedTimestamp = lastUpdatedTimestamp
            self.queryTexts = queryTexts
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTimestamp = "CreationTimestamp"
            case description = "Description"
            case featuredDocuments = "FeaturedDocuments"
            case featuredResultsSetId = "FeaturedResultsSetId"
            case featuredResultsSetName = "FeaturedResultsSetName"
            case lastUpdatedTimestamp = "LastUpdatedTimestamp"
            case queryTexts = "QueryTexts"
            case status = "Status"
        }
    }

    public struct FeaturedResultsSetSummary: AWSDecodableShape {
        /// The Unix timestamp when the set of featured results was created.
        public let creationTimestamp: Int64?
        /// The identifier of the set of featured results.
        public let featuredResultsSetId: String?
        /// The name for the set of featured results.
        public let featuredResultsSetName: String?
        /// The Unix timestamp when the set of featured results was last updated.
        public let lastUpdatedTimestamp: Int64?
        /// The current status of the set of featured results. When the value is  ACTIVE, featured results are ready for use. You can still  configure your settings before setting the status to ACTIVE.  You can set the status to ACTIVE or INACTIVE  using the UpdateFeaturedResultsSet API. The queries you specify for  featured results must be unique per featured results set for each index,  whether the status is ACTIVE or INACTIVE.
        public let status: FeaturedResultsSetStatus?

        @inlinable
        public init(creationTimestamp: Int64? = nil, featuredResultsSetId: String? = nil, featuredResultsSetName: String? = nil, lastUpdatedTimestamp: Int64? = nil, status: FeaturedResultsSetStatus? = nil) {
            self.creationTimestamp = creationTimestamp
            self.featuredResultsSetId = featuredResultsSetId
            self.featuredResultsSetName = featuredResultsSetName
            self.lastUpdatedTimestamp = lastUpdatedTimestamp
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTimestamp = "CreationTimestamp"
            case featuredResultsSetId = "FeaturedResultsSetId"
            case featuredResultsSetName = "FeaturedResultsSetName"
            case lastUpdatedTimestamp = "LastUpdatedTimestamp"
            case status = "Status"
        }
    }

    public struct FsxConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of regular expression patterns to exclude certain files in your Amazon FSx file system. Files that match the patterns are excluded from the index. Files that don't match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map Amazon FSx data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Amazon FSx fields. For more information, see Mapping data source fields. The Amazon FSx data source field names must exist in your Amazon FSx custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// The identifier of the Amazon FSx file system. You can find your file system ID on the file system dashboard in the Amazon FSx console. For information on how to create a file system in Amazon FSx console, using Windows File Server as an example, see Amazon FSx Getting started guide.
        public let fileSystemId: String
        /// The Amazon FSx file system type. Windows is currently the only supported type.
        public let fileSystemType: FsxFileSystemType
        /// A list of regular expression patterns to include certain files in your Amazon FSx file system. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your Amazon FSx file system. Windows is currently the only supported type. The secret must contain a JSON structure with the following keys:   username—The Active Directory user name, along with the Domain Name System (DNS) domain name. For example, user@corp.example.com. The Active Directory user account must have read and mounting access to the Amazon FSx file system for Windows.   password—The password of the Active Directory user account with read and mounting access to the Amazon FSx Windows file system.
        public let secretArn: String?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Amazon FSx. Your Amazon FSx instance must reside inside your VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration

        @inlinable
        public init(exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, fileSystemId: String, fileSystemType: FsxFileSystemType, inclusionPatterns: [String]? = nil, secretArn: String? = nil, vpcConfiguration: DataSourceVpcConfiguration) {
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.fileSystemId = fileSystemId
            self.fileSystemType = fileSystemType
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 21)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, min: 11)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(fs-[0-9a-f]{8,})$")
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.vpcConfiguration.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case fileSystemId = "FileSystemId"
            case fileSystemType = "FileSystemType"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct GetQuerySuggestionsRequest: AWSEncodableShape {
        /// Configuration information for the document fields/attributes that you  want to base query suggestions on.
        public let attributeSuggestionsConfig: AttributeSuggestionsGetConfig?
        /// The identifier of the index you want to get query suggestions from.
        public let indexId: String
        /// The maximum number of query suggestions you want to show  to your users.
        public let maxSuggestionsCount: Int?
        /// The text of a user's query to generate query suggestions. A query is suggested if the query prefix matches  what a user starts to type as their query. Amazon Kendra does not show any suggestions if a user  types fewer than two characters or more than 60 characters.  A query must also have at least one search result and contain  at least one word of more than four characters.
        public let queryText: String
        /// The suggestions type to base query suggestions on. The suggestion  types are query history or document fields/attributes. You can set  one type or the other. If you set query history as your suggestions type, Amazon Kendra  suggests queries relevant to your users based on popular queries in  the query history. If you set document fields/attributes as your suggestions type,  Amazon Kendra suggests queries relevant to your users based on the  contents of document fields.
        public let suggestionTypes: [SuggestionType]?

        @inlinable
        public init(attributeSuggestionsConfig: AttributeSuggestionsGetConfig? = nil, indexId: String, maxSuggestionsCount: Int? = nil, queryText: String, suggestionTypes: [SuggestionType]? = nil) {
            self.attributeSuggestionsConfig = attributeSuggestionsConfig
            self.indexId = indexId
            self.maxSuggestionsCount = maxSuggestionsCount
            self.queryText = queryText
            self.suggestionTypes = suggestionTypes
        }

        public func validate(name: String) throws {
            try self.attributeSuggestionsConfig?.validate(name: "\(name).attributeSuggestionsConfig")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryText, name: "queryText", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeSuggestionsConfig = "AttributeSuggestionsConfig"
            case indexId = "IndexId"
            case maxSuggestionsCount = "MaxSuggestionsCount"
            case queryText = "QueryText"
            case suggestionTypes = "SuggestionTypes"
        }
    }

    public struct GetQuerySuggestionsResponse: AWSDecodableShape {
        /// The identifier for a list of query suggestions for an index.
        public let querySuggestionsId: String?
        /// A list of query suggestions for an index.
        public let suggestions: [Suggestion]?

        @inlinable
        public init(querySuggestionsId: String? = nil, suggestions: [Suggestion]? = nil) {
            self.querySuggestionsId = querySuggestionsId
            self.suggestions = suggestions
        }

        private enum CodingKeys: String, CodingKey {
            case querySuggestionsId = "QuerySuggestionsId"
            case suggestions = "Suggestions"
        }
    }

    public struct GetSnapshotsRequest: AWSEncodableShape {
        /// The identifier of the index to get search metrics data.
        public let indexId: String
        /// The time interval or time window to get search metrics data. The time interval uses the time zone of your index. You can view data in the following time windows:    THIS_WEEK: The current week, starting on the Sunday and ending on the day before the current date.    ONE_WEEK_AGO: The previous week, starting on the Sunday and ending on the following Saturday.    TWO_WEEKS_AGO: The week before the previous week, starting on the Sunday and ending on the following Saturday.    THIS_MONTH: The current month, starting on the first day of the month and ending on the day before the current date.    ONE_MONTH_AGO: The previous month, starting on the first day of the month and ending on the last day of the month.    TWO_MONTHS_AGO: The month before the previous month, starting on the first day of the month and ending on last day of the month.
        public let interval: Interval
        /// The maximum number of returned data for the metric.
        public let maxResults: Int?
        /// The metric you want to retrieve. You can specify only one metric per call. For more information about the metrics you can view, see Gaining insights with search analytics.
        public let metricType: MetricType
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of search metrics data.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, interval: Interval, maxResults: Int? = nil, metricType: MetricType, nextToken: String? = nil) {
            self.indexId = indexId
            self.interval = interval
            self.maxResults = maxResults
            self.metricType = metricType
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case interval = "Interval"
            case maxResults = "MaxResults"
            case metricType = "MetricType"
            case nextToken = "NextToken"
        }
    }

    public struct GetSnapshotsResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in a later request to retrieve the next set of search metrics data.
        public let nextToken: String?
        /// The search metrics data. The data returned depends on the metric type you requested.
        public let snapshotsData: [[String]]?
        /// The column headers for the search metrics data.
        public let snapshotsDataHeader: [String]?
        /// The Unix timestamp for the beginning and end of the time window for the  search metrics data.
        public let snapShotTimeFilter: TimeRange?

        @inlinable
        public init(nextToken: String? = nil, snapshotsData: [[String]]? = nil, snapshotsDataHeader: [String]? = nil, snapShotTimeFilter: TimeRange? = nil) {
            self.nextToken = nextToken
            self.snapshotsData = snapshotsData
            self.snapshotsDataHeader = snapshotsDataHeader
            self.snapShotTimeFilter = snapShotTimeFilter
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case snapshotsData = "SnapshotsData"
            case snapshotsDataHeader = "SnapshotsDataHeader"
            case snapShotTimeFilter = "SnapShotTimeFilter"
        }
    }

    public struct GitHubConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of regular expression patterns to exclude certain file names in your GitHub repository or repositories. File names that match the patterns are excluded from the index. File names that don't match the patterns are included in the index. If a file matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionFileNamePatterns: [String]?
        /// A list of regular expression patterns to exclude certain file types in your GitHub repository or repositories. File types that match the patterns are excluded from the index. File types that don't match the patterns are included in the index. If a file matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionFileTypePatterns: [String]?
        /// A list of regular expression patterns to exclude certain folder names in your GitHub repository or repositories. Folder names that match the patterns are excluded from the index. Folder names that don't match the patterns are included in the index. If a folder matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the folder isn't included in the index.
        public let exclusionFolderNamePatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub commits to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubCommitConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// Configuration information to include certain types of GitHub content. You can configure to index repository files only, or also include issues and pull requests, comments, and comment attachments.
        public let gitHubDocumentCrawlProperties: GitHubDocumentCrawlProperties?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issue attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubIssueAttachmentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issue comments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubIssueCommentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issues to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubIssueDocumentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull request comments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubPullRequestCommentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull request attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubPullRequestDocumentAttachmentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull requests to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubPullRequestDocumentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map GitHub repository attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.
        public let gitHubRepositoryConfigurationFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain file names in your GitHub repository or repositories. File names that match the patterns are included in the index. File names that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionFileNamePatterns: [String]?
        /// A list of regular expression patterns to include certain file types in your GitHub repository or repositories. File types that match the patterns are included in the index. File types that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionFileTypePatterns: [String]?
        /// A list of regular expression patterns to include certain folder names in your GitHub repository or repositories. Folder names that match the patterns are included in the index. Folder names that don't match the patterns are excluded from the index. If a folder matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the folder isn't included in the index.
        public let inclusionFolderNamePatterns: [String]?
        /// Configuration information to connect to GitHub Enterprise Server (on premises).
        public let onPremiseConfiguration: OnPremiseConfiguration?
        /// A list of names of the specific repositories you want to index.
        public let repositoryFilter: [String]?
        /// Configuration information to connect to GitHub Enterprise Cloud (SaaS).
        public let saaSConfiguration: SaaSConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your GitHub. The secret must contain a JSON structure with the following keys:   personalToken—The access token created in GitHub. For more information on creating a token in GitHub, see Using a GitHub data source.
        public let secretArn: String
        /// The type of GitHub service you want to connect to—GitHub Enterprise Cloud (SaaS) or GitHub Enterprise Server (on premises).
        public let type: `Type`?
        ///  TRUE to use the GitHub change log to determine which documents require updating in the index. Depending on the GitHub change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in GitHub.
        public let useChangeLog: Bool?
        /// Configuration information of an Amazon Virtual Private Cloud to connect to your GitHub. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(exclusionFileNamePatterns: [String]? = nil, exclusionFileTypePatterns: [String]? = nil, exclusionFolderNamePatterns: [String]? = nil, gitHubCommitConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubDocumentCrawlProperties: GitHubDocumentCrawlProperties? = nil, gitHubIssueAttachmentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubIssueCommentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubIssueDocumentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubPullRequestCommentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubPullRequestDocumentAttachmentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubPullRequestDocumentConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, gitHubRepositoryConfigurationFieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionFileNamePatterns: [String]? = nil, inclusionFileTypePatterns: [String]? = nil, inclusionFolderNamePatterns: [String]? = nil, onPremiseConfiguration: OnPremiseConfiguration? = nil, repositoryFilter: [String]? = nil, saaSConfiguration: SaaSConfiguration? = nil, secretArn: String, type: `Type`? = nil, useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.exclusionFileNamePatterns = exclusionFileNamePatterns
            self.exclusionFileTypePatterns = exclusionFileTypePatterns
            self.exclusionFolderNamePatterns = exclusionFolderNamePatterns
            self.gitHubCommitConfigurationFieldMappings = gitHubCommitConfigurationFieldMappings
            self.gitHubDocumentCrawlProperties = gitHubDocumentCrawlProperties
            self.gitHubIssueAttachmentConfigurationFieldMappings = gitHubIssueAttachmentConfigurationFieldMappings
            self.gitHubIssueCommentConfigurationFieldMappings = gitHubIssueCommentConfigurationFieldMappings
            self.gitHubIssueDocumentConfigurationFieldMappings = gitHubIssueDocumentConfigurationFieldMappings
            self.gitHubPullRequestCommentConfigurationFieldMappings = gitHubPullRequestCommentConfigurationFieldMappings
            self.gitHubPullRequestDocumentAttachmentConfigurationFieldMappings = gitHubPullRequestDocumentAttachmentConfigurationFieldMappings
            self.gitHubPullRequestDocumentConfigurationFieldMappings = gitHubPullRequestDocumentConfigurationFieldMappings
            self.gitHubRepositoryConfigurationFieldMappings = gitHubRepositoryConfigurationFieldMappings
            self.inclusionFileNamePatterns = inclusionFileNamePatterns
            self.inclusionFileTypePatterns = inclusionFileTypePatterns
            self.inclusionFolderNamePatterns = inclusionFolderNamePatterns
            self.onPremiseConfiguration = onPremiseConfiguration
            self.repositoryFilter = repositoryFilter
            self.saaSConfiguration = saaSConfiguration
            self.secretArn = secretArn
            self.type = type
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.exclusionFileNamePatterns?.forEach {
                try validate($0, name: "exclusionFileNamePatterns[]", parent: name, max: 2048)
                try validate($0, name: "exclusionFileNamePatterns[]", parent: name, min: 1)
            }
            try self.exclusionFileTypePatterns?.forEach {
                try validate($0, name: "exclusionFileTypePatterns[]", parent: name, max: 2048)
                try validate($0, name: "exclusionFileTypePatterns[]", parent: name, min: 1)
            }
            try self.exclusionFolderNamePatterns?.forEach {
                try validate($0, name: "exclusionFolderNamePatterns[]", parent: name, max: 2048)
                try validate($0, name: "exclusionFolderNamePatterns[]", parent: name, min: 1)
            }
            try self.gitHubCommitConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubCommitConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubCommitConfigurationFieldMappings, name: "gitHubCommitConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubCommitConfigurationFieldMappings, name: "gitHubCommitConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubIssueAttachmentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubIssueAttachmentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubIssueAttachmentConfigurationFieldMappings, name: "gitHubIssueAttachmentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubIssueAttachmentConfigurationFieldMappings, name: "gitHubIssueAttachmentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubIssueCommentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubIssueCommentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubIssueCommentConfigurationFieldMappings, name: "gitHubIssueCommentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubIssueCommentConfigurationFieldMappings, name: "gitHubIssueCommentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubIssueDocumentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubIssueDocumentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubIssueDocumentConfigurationFieldMappings, name: "gitHubIssueDocumentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubIssueDocumentConfigurationFieldMappings, name: "gitHubIssueDocumentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubPullRequestCommentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubPullRequestCommentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubPullRequestCommentConfigurationFieldMappings, name: "gitHubPullRequestCommentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubPullRequestCommentConfigurationFieldMappings, name: "gitHubPullRequestCommentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubPullRequestDocumentAttachmentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubPullRequestDocumentAttachmentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubPullRequestDocumentAttachmentConfigurationFieldMappings, name: "gitHubPullRequestDocumentAttachmentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubPullRequestDocumentAttachmentConfigurationFieldMappings, name: "gitHubPullRequestDocumentAttachmentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubPullRequestDocumentConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubPullRequestDocumentConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubPullRequestDocumentConfigurationFieldMappings, name: "gitHubPullRequestDocumentConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubPullRequestDocumentConfigurationFieldMappings, name: "gitHubPullRequestDocumentConfigurationFieldMappings", parent: name, min: 1)
            try self.gitHubRepositoryConfigurationFieldMappings?.forEach {
                try $0.validate(name: "\(name).gitHubRepositoryConfigurationFieldMappings[]")
            }
            try self.validate(self.gitHubRepositoryConfigurationFieldMappings, name: "gitHubRepositoryConfigurationFieldMappings", parent: name, max: 100)
            try self.validate(self.gitHubRepositoryConfigurationFieldMappings, name: "gitHubRepositoryConfigurationFieldMappings", parent: name, min: 1)
            try self.inclusionFileNamePatterns?.forEach {
                try validate($0, name: "inclusionFileNamePatterns[]", parent: name, max: 2048)
                try validate($0, name: "inclusionFileNamePatterns[]", parent: name, min: 1)
            }
            try self.inclusionFileTypePatterns?.forEach {
                try validate($0, name: "inclusionFileTypePatterns[]", parent: name, max: 2048)
                try validate($0, name: "inclusionFileTypePatterns[]", parent: name, min: 1)
            }
            try self.inclusionFolderNamePatterns?.forEach {
                try validate($0, name: "inclusionFolderNamePatterns[]", parent: name, max: 2048)
                try validate($0, name: "inclusionFolderNamePatterns[]", parent: name, min: 1)
            }
            try self.onPremiseConfiguration?.validate(name: "\(name).onPremiseConfiguration")
            try self.repositoryFilter?.forEach {
                try validate($0, name: "repositoryFilter[]", parent: name, max: 64)
                try validate($0, name: "repositoryFilter[]", parent: name, min: 1)
                try validate($0, name: "repositoryFilter[]", parent: name, pattern: "^[A-Za-z0-9_.-]+$")
            }
            try self.saaSConfiguration?.validate(name: "\(name).saaSConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case exclusionFileNamePatterns = "ExclusionFileNamePatterns"
            case exclusionFileTypePatterns = "ExclusionFileTypePatterns"
            case exclusionFolderNamePatterns = "ExclusionFolderNamePatterns"
            case gitHubCommitConfigurationFieldMappings = "GitHubCommitConfigurationFieldMappings"
            case gitHubDocumentCrawlProperties = "GitHubDocumentCrawlProperties"
            case gitHubIssueAttachmentConfigurationFieldMappings = "GitHubIssueAttachmentConfigurationFieldMappings"
            case gitHubIssueCommentConfigurationFieldMappings = "GitHubIssueCommentConfigurationFieldMappings"
            case gitHubIssueDocumentConfigurationFieldMappings = "GitHubIssueDocumentConfigurationFieldMappings"
            case gitHubPullRequestCommentConfigurationFieldMappings = "GitHubPullRequestCommentConfigurationFieldMappings"
            case gitHubPullRequestDocumentAttachmentConfigurationFieldMappings = "GitHubPullRequestDocumentAttachmentConfigurationFieldMappings"
            case gitHubPullRequestDocumentConfigurationFieldMappings = "GitHubPullRequestDocumentConfigurationFieldMappings"
            case gitHubRepositoryConfigurationFieldMappings = "GitHubRepositoryConfigurationFieldMappings"
            case inclusionFileNamePatterns = "InclusionFileNamePatterns"
            case inclusionFileTypePatterns = "InclusionFileTypePatterns"
            case inclusionFolderNamePatterns = "InclusionFolderNamePatterns"
            case onPremiseConfiguration = "OnPremiseConfiguration"
            case repositoryFilter = "RepositoryFilter"
            case saaSConfiguration = "SaaSConfiguration"
            case secretArn = "SecretArn"
            case type = "Type"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct GitHubDocumentCrawlProperties: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to index all issues within a repository.
        public let crawlIssue: Bool?
        ///  TRUE to index all comments on issues.
        public let crawlIssueComment: Bool?
        ///  TRUE to include all comment attachments for issues.
        public let crawlIssueCommentAttachment: Bool?
        ///  TRUE to index all pull requests within a repository.
        public let crawlPullRequest: Bool?
        ///  TRUE to index all comments on pull requests.
        public let crawlPullRequestComment: Bool?
        ///  TRUE to include all comment attachments for pull requests.
        public let crawlPullRequestCommentAttachment: Bool?
        ///  TRUE to index all files with a repository.
        public let crawlRepositoryDocuments: Bool?

        @inlinable
        public init(crawlIssue: Bool? = nil, crawlIssueComment: Bool? = nil, crawlIssueCommentAttachment: Bool? = nil, crawlPullRequest: Bool? = nil, crawlPullRequestComment: Bool? = nil, crawlPullRequestCommentAttachment: Bool? = nil, crawlRepositoryDocuments: Bool? = nil) {
            self.crawlIssue = crawlIssue
            self.crawlIssueComment = crawlIssueComment
            self.crawlIssueCommentAttachment = crawlIssueCommentAttachment
            self.crawlPullRequest = crawlPullRequest
            self.crawlPullRequestComment = crawlPullRequestComment
            self.crawlPullRequestCommentAttachment = crawlPullRequestCommentAttachment
            self.crawlRepositoryDocuments = crawlRepositoryDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case crawlIssue = "CrawlIssue"
            case crawlIssueComment = "CrawlIssueComment"
            case crawlIssueCommentAttachment = "CrawlIssueCommentAttachment"
            case crawlPullRequest = "CrawlPullRequest"
            case crawlPullRequestComment = "CrawlPullRequestComment"
            case crawlPullRequestCommentAttachment = "CrawlPullRequestCommentAttachment"
            case crawlRepositoryDocuments = "CrawlRepositoryDocuments"
        }
    }

    public struct GoogleDriveConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of MIME types to exclude from the index. All documents matching the specified MIME type are excluded.  For a list of MIME types, see Using a Google Workspace Drive data source.
        public let excludeMimeTypes: [String]?
        /// A list of identifiers or shared drives to exclude from the index. All files and folders stored on the shared drive are excluded.
        public let excludeSharedDrives: [String]?
        /// A list of email addresses of the users. Documents owned by these users are excluded from the index. Documents shared with excluded users are indexed unless they are excluded in another way.
        public let excludeUserAccounts: [String]?
        /// A list of regular expression patterns to exclude certain items in your Google Drive, including shared drives and users' My Drives. Items that match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
        public let exclusionPatterns: [String]?
        /// Maps Google Drive data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Google Drive fields. For more information, see Mapping data source fields. The Google Drive data source field names must exist in your Google Drive custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain items in your Google Drive, including shared drives and users' My Drives. Items that match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of a Secrets Managersecret that contains the credentials required to connect to Google Drive. For more information, see Using a Google Workspace Drive data source.
        public let secretArn: String

        @inlinable
        public init(excludeMimeTypes: [String]? = nil, excludeSharedDrives: [String]? = nil, excludeUserAccounts: [String]? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, secretArn: String) {
            self.excludeMimeTypes = excludeMimeTypes
            self.excludeSharedDrives = excludeSharedDrives
            self.excludeUserAccounts = excludeUserAccounts
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
        }

        public func validate(name: String) throws {
            try self.excludeMimeTypes?.forEach {
                try validate($0, name: "excludeMimeTypes[]", parent: name, max: 256)
                try validate($0, name: "excludeMimeTypes[]", parent: name, min: 1)
                try validate($0, name: "excludeMimeTypes[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeMimeTypes, name: "excludeMimeTypes", parent: name, max: 30)
            try self.excludeSharedDrives?.forEach {
                try validate($0, name: "excludeSharedDrives[]", parent: name, max: 256)
                try validate($0, name: "excludeSharedDrives[]", parent: name, min: 1)
                try validate($0, name: "excludeSharedDrives[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeSharedDrives, name: "excludeSharedDrives", parent: name, max: 100)
            try self.excludeUserAccounts?.forEach {
                try validate($0, name: "excludeUserAccounts[]", parent: name, max: 256)
                try validate($0, name: "excludeUserAccounts[]", parent: name, min: 1)
                try validate($0, name: "excludeUserAccounts[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeUserAccounts, name: "excludeUserAccounts", parent: name, max: 100)
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case excludeMimeTypes = "ExcludeMimeTypes"
            case excludeSharedDrives = "ExcludeSharedDrives"
            case excludeUserAccounts = "ExcludeUserAccounts"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
        }
    }

    public struct GroupMembers: AWSEncodableShape {
        /// A list of users that belong to a group. This can also include sub groups. For example,  the sub groups "Research", "Engineering", and "Sales and Marketing" all belong to the group  "Company A".
        public let memberGroups: [MemberGroup]?
        /// A list of users that belong to a group. For example, a list of interns all belong to the "Interns" group.
        public let memberUsers: [MemberUser]?
        /// If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000. You can download this example S3 file that uses the correct format for listing group members. Note, dataSourceId is optional. The value of type for a group is always GROUP and for a user it is always USER.
        public let s3PathforGroupMembers: S3Path?

        @inlinable
        public init(memberGroups: [MemberGroup]? = nil, memberUsers: [MemberUser]? = nil, s3PathforGroupMembers: S3Path? = nil) {
            self.memberGroups = memberGroups
            self.memberUsers = memberUsers
            self.s3PathforGroupMembers = s3PathforGroupMembers
        }

        public func validate(name: String) throws {
            try self.memberGroups?.forEach {
                try $0.validate(name: "\(name).memberGroups[]")
            }
            try self.validate(self.memberGroups, name: "memberGroups", parent: name, max: 1000)
            try self.validate(self.memberGroups, name: "memberGroups", parent: name, min: 1)
            try self.memberUsers?.forEach {
                try $0.validate(name: "\(name).memberUsers[]")
            }
            try self.validate(self.memberUsers, name: "memberUsers", parent: name, max: 1000)
            try self.validate(self.memberUsers, name: "memberUsers", parent: name, min: 1)
            try self.s3PathforGroupMembers?.validate(name: "\(name).s3PathforGroupMembers")
        }

        private enum CodingKeys: String, CodingKey {
            case memberGroups = "MemberGroups"
            case memberUsers = "MemberUsers"
            case s3PathforGroupMembers = "S3PathforGroupMembers"
        }
    }

    public struct GroupOrderingIdSummary: AWSDecodableShape {
        /// The reason an action could not be processed. An action can be a PUT or DELETE action for mapping users to their groups.
        public let failureReason: String?
        /// The Unix timestamp when an action was last updated. An action can be a PUT  or DELETE action for mapping users to their groups.
        public let lastUpdatedAt: Date?
        /// The order in which actions should complete processing. An action can be a PUT or DELETE action for mapping users to their groups.
        public let orderingId: Int64?
        /// The Unix timestamp when an action was received by Amazon Kendra. An action can  be a PUT or DELETE action for mapping users to their groups.
        public let receivedAt: Date?
        /// The current processing status of actions for mapping users to their groups. The status can be either PROCESSING, SUCCEEDED, DELETING, DELETED, or FAILED.
        public let status: PrincipalMappingStatus?

        @inlinable
        public init(failureReason: String? = nil, lastUpdatedAt: Date? = nil, orderingId: Int64? = nil, receivedAt: Date? = nil, status: PrincipalMappingStatus? = nil) {
            self.failureReason = failureReason
            self.lastUpdatedAt = lastUpdatedAt
            self.orderingId = orderingId
            self.receivedAt = receivedAt
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case lastUpdatedAt = "LastUpdatedAt"
            case orderingId = "OrderingId"
            case receivedAt = "ReceivedAt"
            case status = "Status"
        }
    }

    public struct GroupSummary: AWSDecodableShape {
        /// The identifier of the group you want group summary information on.
        public let groupId: String?
        /// The timestamp identifier used for the latest PUT or DELETE action.
        public let orderingId: Int64?

        @inlinable
        public init(groupId: String? = nil, orderingId: Int64? = nil) {
            self.groupId = groupId
            self.orderingId = orderingId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case orderingId = "OrderingId"
        }
    }

    public struct HierarchicalPrincipal: AWSEncodableShape & AWSDecodableShape {
        /// A list of principal lists that define the hierarchy for which documents users should have access to. Each hierarchical list specifies which user or group has allow or deny access for each document.
        public let principalList: [Principal]

        @inlinable
        public init(principalList: [Principal]) {
            self.principalList = principalList
        }

        public func validate(name: String) throws {
            try self.principalList.forEach {
                try $0.validate(name: "\(name).principalList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case principalList = "PrincipalList"
        }
    }

    public struct Highlight: AWSDecodableShape {
        /// The zero-based location in the response string where the highlight starts.
        public let beginOffset: Int
        /// The zero-based location in the response string where the highlight ends.
        public let endOffset: Int
        /// Indicates whether the response is the best response. True if this is the best response; otherwise, false.
        public let topAnswer: Bool?
        /// The highlight type.
        public let type: HighlightType?

        @inlinable
        public init(beginOffset: Int, endOffset: Int, topAnswer: Bool? = nil, type: HighlightType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.topAnswer = topAnswer
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case topAnswer = "TopAnswer"
            case type = "Type"
        }
    }

    public struct HookConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time.
        public let invocationCondition: DocumentAttributeCondition?
        /// The Amazon Resource Name (ARN) of an IAM role with permission to run a Lambda function during ingestion. For more information, see an IAM roles for Amazon Kendra.
        public let lambdaArn: String
        /// Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
        public let s3Bucket: String

        @inlinable
        public init(invocationCondition: DocumentAttributeCondition? = nil, lambdaArn: String, s3Bucket: String) {
            self.invocationCondition = invocationCondition
            self.lambdaArn = lambdaArn
            self.s3Bucket = s3Bucket
        }

        public func validate(name: String) throws {
            try self.invocationCondition?.validate(name: "\(name).invocationCondition")
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 1)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^/arn:aws[a-zA-Z-]*:lambda:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?/$")
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, max: 63)
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, min: 3)
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
        }

        private enum CodingKeys: String, CodingKey {
            case invocationCondition = "InvocationCondition"
            case lambdaArn = "LambdaArn"
            case s3Bucket = "S3Bucket"
        }
    }

    public struct IndexConfigurationSummary: AWSDecodableShape {
        /// The Unix timestamp when the index was created.
        public let createdAt: Date
        /// Indicates whether the index is a Enterprise Edition index or a Developer Edition index.
        public let edition: IndexEdition?
        /// A identifier for the index. Use this to identify the index when you are using APIs such as Query, DescribeIndex, UpdateIndex, and DeleteIndex.
        public let id: String?
        /// The name of the index.
        public let name: String?
        /// The current status of the index. When the status is ACTIVE, the index is ready to search.
        public let status: IndexStatus
        /// The Unix timestamp when the index was last updated.
        public let updatedAt: Date

        @inlinable
        public init(createdAt: Date, edition: IndexEdition? = nil, id: String? = nil, name: String? = nil, status: IndexStatus, updatedAt: Date) {
            self.createdAt = createdAt
            self.edition = edition
            self.id = id
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case edition = "Edition"
            case id = "Id"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct IndexStatistics: AWSDecodableShape {
        /// The number of question and answer topics in the index.
        public let faqStatistics: FaqStatistics
        /// The number of text documents indexed.
        public let textDocumentStatistics: TextDocumentStatistics

        @inlinable
        public init(faqStatistics: FaqStatistics, textDocumentStatistics: TextDocumentStatistics) {
            self.faqStatistics = faqStatistics
            self.textDocumentStatistics = textDocumentStatistics
        }

        private enum CodingKeys: String, CodingKey {
            case faqStatistics = "FaqStatistics"
            case textDocumentStatistics = "TextDocumentStatistics"
        }
    }

    public struct InlineCustomDocumentEnrichmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration of the condition used for the target document attribute or metadata field when ingesting documents into Amazon Kendra.
        public let condition: DocumentAttributeCondition?
        ///  TRUE to delete content if the condition used for the target attribute is met.
        public let documentContentDeletion: Bool?
        /// Configuration of the target document attribute or metadata field when ingesting documents into Amazon Kendra. You can also include a value.
        public let target: DocumentAttributeTarget?

        @inlinable
        public init(condition: DocumentAttributeCondition? = nil, documentContentDeletion: Bool? = nil, target: DocumentAttributeTarget? = nil) {
            self.condition = condition
            self.documentContentDeletion = documentContentDeletion
            self.target = target
        }

        public func validate(name: String) throws {
            try self.condition?.validate(name: "\(name).condition")
            try self.target?.validate(name: "\(name).target")
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case documentContentDeletion = "DocumentContentDeletion"
            case target = "Target"
        }
    }

    public struct JiraConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Jira attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Jira fields. For more information, see  Mapping data source fields. The Jira data source field names must exist in your Jira custom metadata.
        public let attachmentFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Jira comments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Jira fields. For more information, see  Mapping data source fields. The Jira data source field names must exist in your Jira custom metadata.
        public let commentFieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to exclude certain file paths, file names, and file types in your Jira data source. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of regular expression patterns to include certain file paths, file names, and file types in your Jira data source. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Jira issues to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Jira fields. For more information, see  Mapping data source fields. The Jira data source field names must exist in your Jira custom metadata.
        public let issueFieldMappings: [DataSourceToIndexFieldMapping]?
        /// Specify whether to crawl comments, attachments, and work logs. You can specify one or more of these options.
        public let issueSubEntityFilter: [IssueSubEntity]?
        /// Specify which issue types to crawl in your Jira data source. You can specify one or more of these options to crawl.
        public let issueType: [String]?
        /// The URL of the Jira account. For example, company.atlassian.net.
        public let jiraAccountUrl: String
        /// Specify which projects to crawl in your Jira data source. You can specify one or more Jira project IDs.
        public let project: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Jira projects to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Jira fields. For more information, see  Mapping data source fields. The Jira data source field names must exist in your Jira custom metadata.
        public let projectFieldMappings: [DataSourceToIndexFieldMapping]?
        /// The Amazon Resource Name (ARN) of a secret in Secrets Manager contains the key-value pairs required to connect to your Jira data source. The secret must contain a JSON structure with the following keys:   jiraId—The Jira user name or email.   jiraCredentials—The Jira API token. For more information, see Using a Jira data source.
        public let secretArn: String
        /// Specify which statuses to crawl in your Jira data source. You can specify one or more of these options to crawl.
        public let status: [String]?
        ///  TRUE to use the Jira change log to determine which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in Jira.
        public let useChangeLog: Bool?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Jira. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Jira work logs to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Jira fields. For more information, see  Mapping data source fields. The Jira data source field names must exist in your Jira custom metadata.
        public let workLogFieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(attachmentFieldMappings: [DataSourceToIndexFieldMapping]? = nil, commentFieldMappings: [DataSourceToIndexFieldMapping]? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, issueFieldMappings: [DataSourceToIndexFieldMapping]? = nil, issueSubEntityFilter: [IssueSubEntity]? = nil, issueType: [String]? = nil, jiraAccountUrl: String, project: [String]? = nil, projectFieldMappings: [DataSourceToIndexFieldMapping]? = nil, secretArn: String, status: [String]? = nil, useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil, workLogFieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.attachmentFieldMappings = attachmentFieldMappings
            self.commentFieldMappings = commentFieldMappings
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.issueFieldMappings = issueFieldMappings
            self.issueSubEntityFilter = issueSubEntityFilter
            self.issueType = issueType
            self.jiraAccountUrl = jiraAccountUrl
            self.project = project
            self.projectFieldMappings = projectFieldMappings
            self.secretArn = secretArn
            self.status = status
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
            self.workLogFieldMappings = workLogFieldMappings
        }

        public func validate(name: String) throws {
            try self.attachmentFieldMappings?.forEach {
                try $0.validate(name: "\(name).attachmentFieldMappings[]")
            }
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, max: 100)
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, min: 1)
            try self.commentFieldMappings?.forEach {
                try $0.validate(name: "\(name).commentFieldMappings[]")
            }
            try self.validate(self.commentFieldMappings, name: "commentFieldMappings", parent: name, max: 100)
            try self.validate(self.commentFieldMappings, name: "commentFieldMappings", parent: name, min: 1)
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.issueFieldMappings?.forEach {
                try $0.validate(name: "\(name).issueFieldMappings[]")
            }
            try self.validate(self.issueFieldMappings, name: "issueFieldMappings", parent: name, max: 100)
            try self.validate(self.issueFieldMappings, name: "issueFieldMappings", parent: name, min: 1)
            try self.validate(self.issueSubEntityFilter, name: "issueSubEntityFilter", parent: name, max: 3)
            try self.issueType?.forEach {
                try validate($0, name: "issueType[]", parent: name, max: 2048)
                try validate($0, name: "issueType[]", parent: name, min: 1)
            }
            try self.validate(self.jiraAccountUrl, name: "jiraAccountUrl", parent: name, max: 2048)
            try self.validate(self.jiraAccountUrl, name: "jiraAccountUrl", parent: name, min: 1)
            try self.validate(self.jiraAccountUrl, name: "jiraAccountUrl", parent: name, pattern: "^https:\\/\\/[a-zA-Z0-9_\\-\\.]+(\\.atlassian\\.net\\/)$")
            try self.project?.forEach {
                try validate($0, name: "project[]", parent: name, max: 2048)
                try validate($0, name: "project[]", parent: name, min: 1)
            }
            try self.projectFieldMappings?.forEach {
                try $0.validate(name: "\(name).projectFieldMappings[]")
            }
            try self.validate(self.projectFieldMappings, name: "projectFieldMappings", parent: name, max: 100)
            try self.validate(self.projectFieldMappings, name: "projectFieldMappings", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.status?.forEach {
                try validate($0, name: "status[]", parent: name, max: 2048)
                try validate($0, name: "status[]", parent: name, min: 1)
            }
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
            try self.workLogFieldMappings?.forEach {
                try $0.validate(name: "\(name).workLogFieldMappings[]")
            }
            try self.validate(self.workLogFieldMappings, name: "workLogFieldMappings", parent: name, max: 100)
            try self.validate(self.workLogFieldMappings, name: "workLogFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentFieldMappings = "AttachmentFieldMappings"
            case commentFieldMappings = "CommentFieldMappings"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case issueFieldMappings = "IssueFieldMappings"
            case issueSubEntityFilter = "IssueSubEntityFilter"
            case issueType = "IssueType"
            case jiraAccountUrl = "JiraAccountUrl"
            case project = "Project"
            case projectFieldMappings = "ProjectFieldMappings"
            case secretArn = "SecretArn"
            case status = "Status"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
            case workLogFieldMappings = "WorkLogFieldMappings"
        }
    }

    public struct JsonTokenTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The group attribute field.
        public let groupAttributeField: String
        /// The user name attribute field.
        public let userNameAttributeField: String

        @inlinable
        public init(groupAttributeField: String, userNameAttributeField: String) {
            self.groupAttributeField = groupAttributeField
            self.userNameAttributeField = userNameAttributeField
        }

        public func validate(name: String) throws {
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, max: 2048)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, min: 1)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, max: 2048)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case groupAttributeField = "GroupAttributeField"
            case userNameAttributeField = "UserNameAttributeField"
        }
    }

    public struct JwtTokenTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The regular expression that identifies the claim.
        public let claimRegex: String?
        /// The group attribute field.
        public let groupAttributeField: String?
        /// The issuer of the token.
        public let issuer: String?
        /// The location of the key.
        public let keyLocation: KeyLocation
        /// The Amazon Resource Name (arn) of the secret.
        public let secretManagerArn: String?
        /// The signing key URL.
        public let url: String?
        /// The user name attribute field.
        public let userNameAttributeField: String?

        @inlinable
        public init(claimRegex: String? = nil, groupAttributeField: String? = nil, issuer: String? = nil, keyLocation: KeyLocation, secretManagerArn: String? = nil, url: String? = nil, userNameAttributeField: String? = nil) {
            self.claimRegex = claimRegex
            self.groupAttributeField = groupAttributeField
            self.issuer = issuer
            self.keyLocation = keyLocation
            self.secretManagerArn = secretManagerArn
            self.url = url
            self.userNameAttributeField = userNameAttributeField
        }

        public func validate(name: String) throws {
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, max: 100)
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, min: 1)
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, max: 100)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, min: 1)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.issuer, name: "issuer", parent: name, max: 65)
            try self.validate(self.issuer, name: "issuer", parent: name, min: 1)
            try self.validate(self.issuer, name: "issuer", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, max: 1284)
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.url, name: "url", parent: name, max: 2048)
            try self.validate(self.url, name: "url", parent: name, min: 1)
            try self.validate(self.url, name: "url", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, max: 100)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, min: 1)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case claimRegex = "ClaimRegex"
            case groupAttributeField = "GroupAttributeField"
            case issuer = "Issuer"
            case keyLocation = "KeyLocation"
            case secretManagerArn = "SecretManagerArn"
            case url = "URL"
            case userNameAttributeField = "UserNameAttributeField"
        }
    }

    public struct ListAccessControlConfigurationsRequest: AWSEncodableShape {
        /// The identifier of the index for the access control configuration.
        public let indexId: String
        /// The maximum number of access control configurations to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there's more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of access control configurations.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccessControlConfigurationsResponse: AWSDecodableShape {
        /// The details of your access control configurations.
        public let accessControlConfigurations: [AccessControlConfigurationSummary]
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in the subsequent request to retrieve the next set of access control configurations.
        public let nextToken: String?

        @inlinable
        public init(accessControlConfigurations: [AccessControlConfigurationSummary], nextToken: String? = nil) {
            self.accessControlConfigurations = accessControlConfigurations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlConfigurations = "AccessControlConfigurations"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataSourceSyncJobsRequest: AWSEncodableShape {
        /// The identifier of the data source connector.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String
        /// The maximum number of synchronization jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of jobs.
        public let nextToken: String?
        /// When specified, the synchronization jobs returned in the list are limited to jobs between the specified dates.
        public let startTimeFilter: TimeRange?
        /// Only returns synchronization jobs with the Status field equal to the specified status.
        public let statusFilter: DataSourceSyncJobStatus?

        @inlinable
        public init(id: String, indexId: String, maxResults: Int? = nil, nextToken: String? = nil, startTimeFilter: TimeRange? = nil, statusFilter: DataSourceSyncJobStatus? = nil) {
            self.id = id
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTimeFilter = startTimeFilter
            self.statusFilter = statusFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case startTimeFilter = "StartTimeFilter"
            case statusFilter = "StatusFilter"
        }
    }

    public struct ListDataSourceSyncJobsResponse: AWSDecodableShape {
        /// A history of synchronization jobs for the data source connector.
        public let history: [DataSourceSyncJob]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of jobs.
        public let nextToken: String?

        @inlinable
        public init(history: [DataSourceSyncJob]? = nil, nextToken: String? = nil) {
            self.history = history
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case history = "History"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataSourcesRequest: AWSEncodableShape {
        /// The identifier of the index used with one or more data source connectors.
        public let indexId: String
        /// The maximum number of data source connectors to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of data source connectors.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataSourcesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of data source connectors.
        public let nextToken: String?
        /// An array of summary information for one or more data source connector.
        public let summaryItems: [DataSourceSummary]?

        @inlinable
        public init(nextToken: String? = nil, summaryItems: [DataSourceSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListEntityPersonasRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The maximum number of returned users or groups.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of users or groups.
        public let nextToken: String?

        @inlinable
        public init(id: String, indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.id = id
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityPersonasResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in  a later request to retrieve the next set of users or groups.
        public let nextToken: String?
        /// An array of summary information for one or more users or groups.
        public let summaryItems: [PersonasSummary]?

        @inlinable
        public init(nextToken: String? = nil, summaryItems: [PersonasSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListExperienceEntitiesRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of users or groups.
        public let nextToken: String?

        @inlinable
        public init(id: String, indexId: String, nextToken: String? = nil) {
            self.id = id
            self.indexId = indexId
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case nextToken = "NextToken"
        }
    }

    public struct ListExperienceEntitiesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in  a later request to retrieve the next set of users or groups.
        public let nextToken: String?
        /// An array of summary information for one or more users or groups.
        public let summaryItems: [ExperienceEntitiesSummary]?

        @inlinable
        public init(nextToken: String? = nil, summaryItems: [ExperienceEntitiesSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListExperiencesRequest: AWSEncodableShape {
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The maximum number of returned Amazon Kendra experiences.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Kendra experiences.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListExperiencesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use  in a later request to retrieve the next set of Amazon Kendra experiences.
        public let nextToken: String?
        /// An array of summary information for one or more Amazon Kendra experiences.
        public let summaryItems: [ExperiencesSummary]?

        @inlinable
        public init(nextToken: String? = nil, summaryItems: [ExperiencesSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListFaqsRequest: AWSEncodableShape {
        /// The index for the FAQs.
        public let indexId: String
        /// The maximum number of FAQs to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of FAQs.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListFaqsResponse: AWSDecodableShape {
        /// Summary information about the FAQs for a specified index.
        public let faqSummaryItems: [FaqSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of FAQs.
        public let nextToken: String?

        @inlinable
        public init(faqSummaryItems: [FaqSummary]? = nil, nextToken: String? = nil) {
            self.faqSummaryItems = faqSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case faqSummaryItems = "FaqSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListFeaturedResultsSetsRequest: AWSEncodableShape {
        /// The identifier of the index used for featuring results.
        public let indexId: String
        /// The maximum number of featured results sets to return.
        public let maxResults: Int?
        /// If the response is truncated, Amazon Kendra returns a pagination token  in the response. You can use this pagination token to retrieve the next set  of featured results sets.
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListFeaturedResultsSetsResponse: AWSDecodableShape {
        /// An array of summary information for one or more featured results sets.
        public let featuredResultsSetSummaryItems: [FeaturedResultsSetSummary]?
        /// If the response is truncated, Amazon Kendra returns a pagination token  in the response.
        public let nextToken: String?

        @inlinable
        public init(featuredResultsSetSummaryItems: [FeaturedResultsSetSummary]? = nil, nextToken: String? = nil) {
            self.featuredResultsSetSummaryItems = featuredResultsSetSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case featuredResultsSetSummaryItems = "FeaturedResultsSetSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupsOlderThanOrderingIdRequest: AWSEncodableShape {
        /// The identifier of the data source for getting a list of groups mapped to users before a given ordering timestamp identifier.
        public let dataSourceId: String?
        /// The identifier of the index for getting a list of groups mapped to users before a given ordering or timestamp identifier.
        public let indexId: String
        ///  The maximum number of returned groups that are mapped to users before a given ordering or timestamp identifier.
        public let maxResults: Int?
        ///  If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of groups that are mapped to users before a given ordering or timestamp identifier.
        public let nextToken: String?
        /// The timestamp identifier used for the latest PUT or DELETE action for mapping users to their groups.
        public let orderingId: Int64

        @inlinable
        public init(dataSourceId: String? = nil, indexId: String, maxResults: Int? = nil, nextToken: String? = nil, orderingId: Int64) {
            self.dataSourceId = dataSourceId
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.orderingId = orderingId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32535158400000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case orderingId = "OrderingId"
        }
    }

    public struct ListGroupsOlderThanOrderingIdResponse: AWSDecodableShape {
        ///  Summary information for list of groups that are mapped to users before a given ordering or timestamp identifier.
        public let groupsSummaries: [GroupSummary]?
        ///  If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of groups that are mapped to users before a given ordering or timestamp identifier.
        public let nextToken: String?

        @inlinable
        public init(groupsSummaries: [GroupSummary]? = nil, nextToken: String? = nil) {
            self.groupsSummaries = groupsSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groupsSummaries = "GroupsSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListIndicesRequest: AWSEncodableShape {
        /// The maximum number of indices to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of indexes.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListIndicesResponse: AWSDecodableShape {
        /// An array of summary information on the configuration of one or more indexes.
        public let indexConfigurationSummaryItems: [IndexConfigurationSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of indexes.
        public let nextToken: String?

        @inlinable
        public init(indexConfigurationSummaryItems: [IndexConfigurationSummary]? = nil, nextToken: String? = nil) {
            self.indexConfigurationSummaryItems = indexConfigurationSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexConfigurationSummaryItems = "IndexConfigurationSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListQuerySuggestionsBlockListsRequest: AWSEncodableShape {
        /// The identifier of the index for a list of all block lists that exist for  that index. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let indexId: String
        /// The maximum number of block lists to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve),  Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of block lists (BlockListSummaryItems).
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListQuerySuggestionsBlockListsResponse: AWSDecodableShape {
        /// Summary items for a block list. This includes summary items on the block list ID, block list name, when the  block list was created, when the block list was last updated, and the count  of block words/phrases in the block list. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let blockListSummaryItems: [QuerySuggestionsBlockListSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use  in the subsequent request to retrieve the next set of block lists.
        public let nextToken: String?

        @inlinable
        public init(blockListSummaryItems: [QuerySuggestionsBlockListSummary]? = nil, nextToken: String? = nil) {
            self.blockListSummaryItems = blockListSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case blockListSummaryItems = "BlockListSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, data source, or other resource to  get a list of tags for. For example, the ARN of an index is constructed as follows:  arn:aws:kendra:your-region:your-account-id:index/index-id  For information on how to construct an ARN for all types of Amazon Kendra resources, see  Resource  types.
        public let resourceARN: String

        @inlinable
        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// A list of tags associated with the index, FAQ, data source, or other resource.
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListThesauriRequest: AWSEncodableShape {
        /// The identifier of the index with one or more thesauri.
        public let indexId: String
        /// The maximum number of thesauri to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of thesauri (ThesaurusSummaryItems).
        public let nextToken: String?

        @inlinable
        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListThesauriResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this  token that you can use in the subsequent request to  retrieve the next set of thesauri.
        public let nextToken: String?
        /// An array of summary information for a thesaurus or multiple thesauri.
        public let thesaurusSummaryItems: [ThesaurusSummary]?

        @inlinable
        public init(nextToken: String? = nil, thesaurusSummaryItems: [ThesaurusSummary]? = nil) {
            self.nextToken = nextToken
            self.thesaurusSummaryItems = thesaurusSummaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case thesaurusSummaryItems = "ThesaurusSummaryItems"
        }
    }

    public struct MemberGroup: AWSEncodableShape {
        /// The identifier of the data source for the sub group you want to map to a group.
        public let dataSourceId: String?
        /// The identifier of the sub group you want to map to a group.
        public let groupId: String

        @inlinable
        public init(dataSourceId: String? = nil, groupId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
        }
    }

    public struct MemberUser: AWSEncodableShape {
        /// The identifier of the user you want to map to a group.
        public let userId: String

        @inlinable
        public init(userId: String) {
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.userId, name: "userId", parent: name, max: 1024)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case userId = "UserId"
        }
    }

    public struct OnPremiseConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The GitHub host URL or API endpoint URL. For example, https://on-prem-host-url/api/v3/
        public let hostUrl: String
        /// The name of the organization of the GitHub Enterprise Server (on-premises) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting Your organizations under your profile picture dropdown.
        public let organizationName: String
        /// The path to the SSL certificate stored in an Amazon S3 bucket. You use this to connect to GitHub if you require a secure SSL connection. You can simply generate a self-signed X509 certificate on any computer using OpenSSL. For an example of using OpenSSL to create an X509 certificate, see Create and sign an X509 certificate.
        public let sslCertificateS3Path: S3Path

        @inlinable
        public init(hostUrl: String, organizationName: String, sslCertificateS3Path: S3Path) {
            self.hostUrl = hostUrl
            self.organizationName = organizationName
            self.sslCertificateS3Path = sslCertificateS3Path
        }

        public func validate(name: String) throws {
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, max: 2048)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, min: 1)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.validate(self.organizationName, name: "organizationName", parent: name, max: 60)
            try self.validate(self.organizationName, name: "organizationName", parent: name, min: 1)
            try self.validate(self.organizationName, name: "organizationName", parent: name, pattern: "^[A-Za-z0-9_.-]+$")
            try self.sslCertificateS3Path.validate(name: "\(name).sslCertificateS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case hostUrl = "HostUrl"
            case organizationName = "OrganizationName"
            case sslCertificateS3Path = "SslCertificateS3Path"
        }
    }

    public struct OneDriveConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to disable local groups information.
        public let disableLocalGroups: Bool?
        /// A list of regular expression patterns to exclude certain documents in your OneDrive. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The pattern is applied to the file name.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map OneDrive data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to OneDrive fields. For more information, see Mapping data source fields. The OneDrive data source field names must exist in your OneDrive custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain documents in your OneDrive. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The pattern is applied to the file name.
        public let inclusionPatterns: [String]?
        /// A list of user accounts whose documents should be indexed.
        public let oneDriveUsers: OneDriveUsers
        /// The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the user name and password to connect to OneDrive. The user name should be the application ID for the OneDrive application, and the password is the application key for the OneDrive application.
        public let secretArn: String
        /// The Azure Active Directory domain of the organization.
        public let tenantDomain: String

        @inlinable
        public init(disableLocalGroups: Bool? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, oneDriveUsers: OneDriveUsers, secretArn: String, tenantDomain: String) {
            self.disableLocalGroups = disableLocalGroups
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.oneDriveUsers = oneDriveUsers
            self.secretArn = secretArn
            self.tenantDomain = tenantDomain
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.oneDriveUsers.validate(name: "\(name).oneDriveUsers")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, max: 256)
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, min: 1)
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, pattern: "^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-z]{2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case disableLocalGroups = "DisableLocalGroups"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case oneDriveUsers = "OneDriveUsers"
            case secretArn = "SecretArn"
            case tenantDomain = "TenantDomain"
        }
    }

    public struct OneDriveUsers: AWSEncodableShape & AWSDecodableShape {
        /// A list of users whose documents should be indexed. Specify the user names in email format, for example, username@tenantdomain. If you need to index the documents of more than 10 users, use the OneDriveUserS3Path field to specify the location of a file containing a list of users.
        public let oneDriveUserList: [String]?
        /// The S3 bucket location of a file containing a list of users whose documents should be indexed.
        public let oneDriveUserS3Path: S3Path?

        @inlinable
        public init(oneDriveUserList: [String]? = nil, oneDriveUserS3Path: S3Path? = nil) {
            self.oneDriveUserList = oneDriveUserList
            self.oneDriveUserS3Path = oneDriveUserS3Path
        }

        public func validate(name: String) throws {
            try self.oneDriveUserList?.forEach {
                try validate($0, name: "oneDriveUserList[]", parent: name, max: 256)
                try validate($0, name: "oneDriveUserList[]", parent: name, min: 1)
                try validate($0, name: "oneDriveUserList[]", parent: name, pattern: "^(?!\\s).+@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$")
            }
            try self.validate(self.oneDriveUserList, name: "oneDriveUserList", parent: name, max: 100)
            try self.validate(self.oneDriveUserList, name: "oneDriveUserList", parent: name, min: 1)
            try self.oneDriveUserS3Path?.validate(name: "\(name).oneDriveUserS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case oneDriveUserList = "OneDriveUserList"
            case oneDriveUserS3Path = "OneDriveUserS3Path"
        }
    }

    public struct PersonasSummary: AWSDecodableShape {
        /// The Unix timestamp when the summary information was created.
        public let createdAt: Date?
        /// The identifier of a user or group in your IAM Identity Center identity source.  For example, a user ID could be an email.
        public let entityId: String?
        /// The persona that defines the specific permissions of the user or group in  your IAM Identity Center identity source. The available personas or access  roles are Owner and Viewer. For more information on  these personas, see Providing  access to your search page.
        public let persona: Persona?
        /// The Unix timestamp when the summary information was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, entityId: String? = nil, persona: Persona? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.entityId = entityId
            self.persona = persona
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case entityId = "EntityId"
            case persona = "Persona"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct Principal: AWSEncodableShape & AWSDecodableShape {
        /// Whether to allow or deny document access to the principal.
        public let access: ReadAccessType
        /// The identifier of the data source the principal should access documents from.
        public let dataSourceId: String?
        /// The name of the user or group.
        public let name: String
        /// The type of principal.
        public let type: PrincipalType

        @inlinable
        public init(access: ReadAccessType, dataSourceId: String? = nil, name: String, type: PrincipalType) {
            self.access = access
            self.dataSourceId = dataSourceId
            self.name = name
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case access = "Access"
            case dataSourceId = "DataSourceId"
            case name = "Name"
            case type = "Type"
        }
    }

    public struct ProxyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret. You create a  secret to store your credentials in Secrets Manager  The credentials are optional. You use a secret if web proxy credentials are required to connect to a website host. Amazon Kendra currently support basic authentication to connect to a web proxy server. The secret stores your credentials.
        public let credentials: String?
        /// The name of the website host you want to connect to via a web proxy server. For example, the host name of https://a.example.com/page1.html is "a.example.com".
        public let host: String
        /// The port number of the website host you want to connect to via a web proxy server.  For example, the port for https://a.example.com/page1.html is 443, the standard port for HTTPS.
        public let port: Int

        @inlinable
        public init(credentials: String? = nil, host: String, port: Int) {
            self.credentials = credentials
            self.host = host
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.credentials, name: "credentials", parent: name, max: 1284)
            try self.validate(self.credentials, name: "credentials", parent: name, min: 1)
            try self.validate(self.credentials, name: "credentials", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.host, name: "host", parent: name, max: 253)
            try self.validate(self.host, name: "host", parent: name, min: 1)
            try self.validate(self.host, name: "host", parent: name, pattern: "^([^\\s]*)$")
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case host = "Host"
            case port = "Port"
        }
    }

    public struct PutPrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source you want to map users to their groups. This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.
        public let dataSourceId: String?
        /// The identifier of the group you want to map its users to.
        public let groupId: String
        /// The list that contains your users that belong the same group. This can include sub groups  that belong to a group. For example, the group "Company A" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing". If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.
        public let groupMembers: GroupMembers
        /// The identifier of the index you want to map users to their groups.
        public let indexId: String
        /// The timestamp identifier you specify to ensure Amazon Kendra doesn't override the latest PUT action with previous actions. The highest number ID, which is the ordering ID, is the latest action you want to process and apply on top of other actions with lower number IDs. This prevents previous actions with lower number IDs from possibly overriding the latest action. The ordering ID can be the Unix time of the last update you made to a group members list. You would then provide this list when calling PutPrincipalMapping. This ensures your PUT action for that updated group with the latest members list doesn't get overwritten by earlier PUT actions for the same group which are yet to be processed. The default ordering ID is the current Unix time in milliseconds that the action was received by Amazon Kendra.
        public let orderingId: Int64?
        /// The Amazon Resource Name (ARN) of an IAM role that has access to the  S3 file that contains your list of users that belong to a group. For more information, see IAM roles for  Amazon Kendra.
        public let roleArn: String?

        @inlinable
        public init(dataSourceId: String? = nil, groupId: String, groupMembers: GroupMembers, indexId: String, orderingId: Int64? = nil, roleArn: String? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.groupMembers = groupMembers
            self.indexId = indexId
            self.orderingId = orderingId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.groupMembers.validate(name: "\(name).groupMembers")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32535158400000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case groupMembers = "GroupMembers"
            case indexId = "IndexId"
            case orderingId = "OrderingId"
            case roleArn = "RoleArn"
        }
    }

    public struct QueryRequest: AWSEncodableShape {
        /// Filters search results by document fields/attributes. You can only provide one attribute filter; however, the AndAllFilters, NotFilter, and OrAllFilters parameters contain a list of other filters. The AttributeFilter parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.  For Amazon Kendra Gen AI Enterprise Edition indices use AttributeFilter to enable document filtering for end users using _email_id or include public documents (_email_id=null).
        public let attributeFilter: AttributeFilter?
        /// Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.
        public let collapseConfiguration: CollapseConfiguration?
        /// Overrides relevance tuning configurations of fields/attributes set at the index level. If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning. If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
        public let documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]?
        /// An array of documents fields/attributes for faceted search. Amazon Kendra returns a count for each field key specified. This helps your users narrow their search.
        public let facets: [Facet]?
        /// The identifier of the index for the search.
        public let indexId: String
        /// Query results are returned in pages the size of the PageSize parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.
        public let pageNumber: Int?
        /// Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
        public let pageSize: Int?
        /// Sets the type of query result or response. Only results for the specified type are returned.
        public let queryResultTypeFilter: QueryResultType?
        /// The input query text for the search. Amazon Kendra truncates queries at 30 token words, which excludes punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For example, Timeoff AND October AND Category:HR is counted as 3 tokens: timeoff, october, hr. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.
        public let queryText: String?
        /// An array of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document attributes are included in the response.
        public let requestedDocumentAttributes: [String]?
        /// Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance. If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
        public let sortingConfiguration: SortingConfiguration?
        /// Provides configuration information to determine how the results of a query are sorted. You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased. If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.
        public let sortingConfigurations: [SortingConfiguration]?
        /// Enables suggested spell corrections for queries.
        public let spellCorrectionConfiguration: SpellCorrectionConfiguration?
        /// The user context token or user and group information.
        public let userContext: UserContext?
        /// Provides an identifier for a specific user. The VisitorId should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the VisitorId.
        public let visitorId: String?

        @inlinable
        public init(attributeFilter: AttributeFilter? = nil, collapseConfiguration: CollapseConfiguration? = nil, documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]? = nil, facets: [Facet]? = nil, indexId: String, pageNumber: Int? = nil, pageSize: Int? = nil, queryResultTypeFilter: QueryResultType? = nil, queryText: String? = nil, requestedDocumentAttributes: [String]? = nil, sortingConfiguration: SortingConfiguration? = nil, sortingConfigurations: [SortingConfiguration]? = nil, spellCorrectionConfiguration: SpellCorrectionConfiguration? = nil, userContext: UserContext? = nil, visitorId: String? = nil) {
            self.attributeFilter = attributeFilter
            self.collapseConfiguration = collapseConfiguration
            self.documentRelevanceOverrideConfigurations = documentRelevanceOverrideConfigurations
            self.facets = facets
            self.indexId = indexId
            self.pageNumber = pageNumber
            self.pageSize = pageSize
            self.queryResultTypeFilter = queryResultTypeFilter
            self.queryText = queryText
            self.requestedDocumentAttributes = requestedDocumentAttributes
            self.sortingConfiguration = sortingConfiguration
            self.sortingConfigurations = sortingConfigurations
            self.spellCorrectionConfiguration = spellCorrectionConfiguration
            self.userContext = userContext
            self.visitorId = visitorId
        }

        public func validate(name: String) throws {
            try self.attributeFilter?.validate(name: "\(name).attributeFilter")
            try self.collapseConfiguration?.validate(name: "\(name).collapseConfiguration")
            try self.documentRelevanceOverrideConfigurations?.forEach {
                try $0.validate(name: "\(name).documentRelevanceOverrideConfigurations[]")
            }
            try self.validate(self.documentRelevanceOverrideConfigurations, name: "documentRelevanceOverrideConfigurations", parent: name, max: 500)
            try self.facets?.forEach {
                try $0.validate(name: "\(name).facets[]")
            }
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.requestedDocumentAttributes?.forEach {
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, max: 200)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, min: 1)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, max: 100)
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, min: 1)
            try self.sortingConfiguration?.validate(name: "\(name).sortingConfiguration")
            try self.sortingConfigurations?.forEach {
                try $0.validate(name: "\(name).sortingConfigurations[]")
            }
            try self.validate(self.sortingConfigurations, name: "sortingConfigurations", parent: name, min: 1)
            try self.userContext?.validate(name: "\(name).userContext")
            try self.validate(self.visitorId, name: "visitorId", parent: name, max: 256)
            try self.validate(self.visitorId, name: "visitorId", parent: name, min: 1)
            try self.validate(self.visitorId, name: "visitorId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeFilter = "AttributeFilter"
            case collapseConfiguration = "CollapseConfiguration"
            case documentRelevanceOverrideConfigurations = "DocumentRelevanceOverrideConfigurations"
            case facets = "Facets"
            case indexId = "IndexId"
            case pageNumber = "PageNumber"
            case pageSize = "PageSize"
            case queryResultTypeFilter = "QueryResultTypeFilter"
            case queryText = "QueryText"
            case requestedDocumentAttributes = "RequestedDocumentAttributes"
            case sortingConfiguration = "SortingConfiguration"
            case sortingConfigurations = "SortingConfigurations"
            case spellCorrectionConfiguration = "SpellCorrectionConfiguration"
            case userContext = "UserContext"
            case visitorId = "VisitorId"
        }
    }

    public struct QueryResult: AWSDecodableShape {
        /// Contains the facet results. A FacetResult contains the counts for each field/attribute key that was specified in the Facets input parameter.
        public let facetResults: [FacetResult]?
        /// The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.
        public let featuredResultsItems: [FeaturedResultsItem]?
        /// The identifier for the search. You also use QueryId to identify the search when using the SubmitFeedback API.
        public let queryId: String?
        /// The results of the search.
        public let resultItems: [QueryResultItem]?
        /// A list of information related to suggested spell corrections for a query.
        public let spellCorrectedQueries: [SpellCorrectedQuery]?
        /// The total number of items found by the search. However, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.
        public let totalNumberOfResults: Int?
        /// A list of warning codes and their messages on problems with your query. Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
        public let warnings: [Warning]?

        @inlinable
        public init(facetResults: [FacetResult]? = nil, featuredResultsItems: [FeaturedResultsItem]? = nil, queryId: String? = nil, resultItems: [QueryResultItem]? = nil, spellCorrectedQueries: [SpellCorrectedQuery]? = nil, totalNumberOfResults: Int? = nil, warnings: [Warning]? = nil) {
            self.facetResults = facetResults
            self.featuredResultsItems = featuredResultsItems
            self.queryId = queryId
            self.resultItems = resultItems
            self.spellCorrectedQueries = spellCorrectedQueries
            self.totalNumberOfResults = totalNumberOfResults
            self.warnings = warnings
        }

        private enum CodingKeys: String, CodingKey {
            case facetResults = "FacetResults"
            case featuredResultsItems = "FeaturedResultsItems"
            case queryId = "QueryId"
            case resultItems = "ResultItems"
            case spellCorrectedQueries = "SpellCorrectedQueries"
            case totalNumberOfResults = "TotalNumberOfResults"
            case warnings = "Warnings"
        }
    }

    public struct QueryResultItem: AWSDecodableShape {
        /// One or more additional fields/attributes associated with the query result.
        public let additionalAttributes: [AdditionalResultAttribute]?
        /// Provides details about a collapsed group of search results.
        public let collapsedResultDetail: CollapsedResultDetail?
        /// An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.
        public let documentAttributes: [DocumentAttribute]?
        /// An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
        public let documentExcerpt: TextWithHighlights?
        /// The identifier for the document.
        public let documentId: String?
        /// The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
        public let documentTitle: TextWithHighlights?
        /// The URI of the original location of the document.
        public let documentURI: String?
        /// A token that identifies a particular result from a particular query. Use this token to provide click-through feedback for the result. For more information, see Submitting feedback.
        public let feedbackToken: String?
        /// If the Type of document within the response is ANSWER, then it is either a TABLE answer or TEXT answer. If it's a table answer, a table excerpt is returned in TableExcerpt. If it's a text answer, a text excerpt is returned in DocumentExcerpt.
        public let format: QueryResultFormat?
        /// The unique identifier for the query result item id (Id) and the query result item document id (DocumentId) combined. The value of this field changes with every request, even when you have the same documents.
        public let id: String?
        /// Indicates the confidence level of Amazon Kendra providing a relevant result for the query. Each result is placed into a bin that indicates the confidence, VERY_HIGH, HIGH, MEDIUM and LOW. You can use the score to determine if a response meets the confidence needed for your application. The field is only set to LOW when the Type field is set to DOCUMENT and Amazon Kendra is not confident that the result is relevant to the query.
        public let scoreAttributes: ScoreAttributes?
        /// An excerpt from a table within a document.
        public let tableExcerpt: TableExcerpt?
        /// The type of document within the response. For example, a response could include a question-answer that's relevant to the query.
        public let type: QueryResultType?

        @inlinable
        public init(additionalAttributes: [AdditionalResultAttribute]? = nil, collapsedResultDetail: CollapsedResultDetail? = nil, documentAttributes: [DocumentAttribute]? = nil, documentExcerpt: TextWithHighlights? = nil, documentId: String? = nil, documentTitle: TextWithHighlights? = nil, documentURI: String? = nil, feedbackToken: String? = nil, format: QueryResultFormat? = nil, id: String? = nil, scoreAttributes: ScoreAttributes? = nil, tableExcerpt: TableExcerpt? = nil, type: QueryResultType? = nil) {
            self.additionalAttributes = additionalAttributes
            self.collapsedResultDetail = collapsedResultDetail
            self.documentAttributes = documentAttributes
            self.documentExcerpt = documentExcerpt
            self.documentId = documentId
            self.documentTitle = documentTitle
            self.documentURI = documentURI
            self.feedbackToken = feedbackToken
            self.format = format
            self.id = id
            self.scoreAttributes = scoreAttributes
            self.tableExcerpt = tableExcerpt
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case additionalAttributes = "AdditionalAttributes"
            case collapsedResultDetail = "CollapsedResultDetail"
            case documentAttributes = "DocumentAttributes"
            case documentExcerpt = "DocumentExcerpt"
            case documentId = "DocumentId"
            case documentTitle = "DocumentTitle"
            case documentURI = "DocumentURI"
            case feedbackToken = "FeedbackToken"
            case format = "Format"
            case id = "Id"
            case scoreAttributes = "ScoreAttributes"
            case tableExcerpt = "TableExcerpt"
            case type = "Type"
        }
    }

    public struct QuerySuggestionsBlockListSummary: AWSDecodableShape {
        /// The Unix timestamp when the block list was created.
        public let createdAt: Date?
        /// The identifier of a block list.
        public let id: String?
        /// The number of items in the block list file.
        public let itemCount: Int?
        /// The name of the block list.
        public let name: String?
        /// The status of the block list.
        public let status: QuerySuggestionsBlockListStatus?
        /// The Unix timestamp when the block list was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, id: String? = nil, itemCount: Int? = nil, name: String? = nil, status: QuerySuggestionsBlockListStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.itemCount = itemCount
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case itemCount = "ItemCount"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct QuipConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Quip attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Quip fields. For more information, see Mapping data source fields. The Quip field names must exist in your Quip custom metadata.
        public let attachmentFieldMappings: [DataSourceToIndexFieldMapping]?
        ///  TRUE to index attachments.
        public let crawlAttachments: Bool?
        ///  TRUE to index the contents of chat rooms.
        public let crawlChatRooms: Bool?
        ///  TRUE to index file comments.
        public let crawlFileComments: Bool?
        /// The Quip site domain. For example, https://quip-company.quipdomain.com/browse. The domain in this example is "quipdomain".
        public let domain: String
        /// A list of regular expression patterns to exclude certain files in your Quip file system. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence, and the file isn't included in the index.
        public let exclusionPatterns: [String]?
        /// The identifiers of the Quip folders you want to index. You can find the folder ID in your browser URL when you access your folder in Quip. For example, https://quip-company.quipdomain.com/zlLuOVNSarTL/folder-name. The folder ID in this example is "zlLuOVNSarTL".
        public let folderIds: [String]?
        /// A list of regular expression patterns to include certain files in your Quip file system. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion pattern and an exclusion pattern, the exclusion pattern takes precedence, and the file isn't included in the index.
        public let inclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Quip messages to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Quip fields. For more information, see Mapping data source fields. The Quip field names must exist in your Quip custom metadata.
        public let messageFieldMappings: [DataSourceToIndexFieldMapping]?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs that are required to connect to your Quip. The secret must contain a JSON structure with the following keys:   accessToken—The token created in Quip. For more information, see Using a Quip data source.
        public let secretArn: String
        /// A list of DataSourceToIndexFieldMapping objects that map attributes or field names of Quip threads to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Quip fields. For more information, see Mapping data source fields. The Quip field names must exist in your Quip custom metadata.
        public let threadFieldMappings: [DataSourceToIndexFieldMapping]?
        /// Configuration information for an Amazon Virtual Private Cloud (VPC) to connect to your Quip. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(attachmentFieldMappings: [DataSourceToIndexFieldMapping]? = nil, crawlAttachments: Bool? = nil, crawlChatRooms: Bool? = nil, crawlFileComments: Bool? = nil, domain: String, exclusionPatterns: [String]? = nil, folderIds: [String]? = nil, inclusionPatterns: [String]? = nil, messageFieldMappings: [DataSourceToIndexFieldMapping]? = nil, secretArn: String, threadFieldMappings: [DataSourceToIndexFieldMapping]? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.attachmentFieldMappings = attachmentFieldMappings
            self.crawlAttachments = crawlAttachments
            self.crawlChatRooms = crawlChatRooms
            self.crawlFileComments = crawlFileComments
            self.domain = domain
            self.exclusionPatterns = exclusionPatterns
            self.folderIds = folderIds
            self.inclusionPatterns = inclusionPatterns
            self.messageFieldMappings = messageFieldMappings
            self.secretArn = secretArn
            self.threadFieldMappings = threadFieldMappings
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.attachmentFieldMappings?.forEach {
                try $0.validate(name: "\(name).attachmentFieldMappings[]")
            }
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, max: 100)
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^(?!-)[A-Za-z0-9-].*(?<!-)$")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.folderIds?.forEach {
                try validate($0, name: "folderIds[]", parent: name, max: 500)
                try validate($0, name: "folderIds[]", parent: name, min: 1)
            }
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.messageFieldMappings?.forEach {
                try $0.validate(name: "\(name).messageFieldMappings[]")
            }
            try self.validate(self.messageFieldMappings, name: "messageFieldMappings", parent: name, max: 100)
            try self.validate(self.messageFieldMappings, name: "messageFieldMappings", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.threadFieldMappings?.forEach {
                try $0.validate(name: "\(name).threadFieldMappings[]")
            }
            try self.validate(self.threadFieldMappings, name: "threadFieldMappings", parent: name, max: 100)
            try self.validate(self.threadFieldMappings, name: "threadFieldMappings", parent: name, min: 1)
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentFieldMappings = "AttachmentFieldMappings"
            case crawlAttachments = "CrawlAttachments"
            case crawlChatRooms = "CrawlChatRooms"
            case crawlFileComments = "CrawlFileComments"
            case domain = "Domain"
            case exclusionPatterns = "ExclusionPatterns"
            case folderIds = "FolderIds"
            case inclusionPatterns = "InclusionPatterns"
            case messageFieldMappings = "MessageFieldMappings"
            case secretArn = "SecretArn"
            case threadFieldMappings = "ThreadFieldMappings"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct Relevance: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.  Only applies to DATE fields.
        public let duration: String?
        /// Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. Only applies to DATE fields.
        public let freshness: Bool?
        /// The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.
        public let importance: Int?
        /// Determines how values should be interpreted. When the RankOrder field is ASCENDING, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1. When the RankOrder field is DESCENDING, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task. Only applies to LONG fields.
        public let rankOrder: Order?
        /// A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department", query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.  For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
        public let valueImportanceMap: [String: Int]?

        @inlinable
        public init(duration: String? = nil, freshness: Bool? = nil, importance: Int? = nil, rankOrder: Order? = nil, valueImportanceMap: [String: Int]? = nil) {
            self.duration = duration
            self.freshness = freshness
            self.importance = importance
            self.rankOrder = rankOrder
            self.valueImportanceMap = valueImportanceMap
        }

        public func validate(name: String) throws {
            try self.validate(self.duration, name: "duration", parent: name, max: 10)
            try self.validate(self.duration, name: "duration", parent: name, min: 1)
            try self.validate(self.duration, name: "duration", parent: name, pattern: "^[0-9]+[s]$")
            try self.validate(self.importance, name: "importance", parent: name, max: 10)
            try self.validate(self.importance, name: "importance", parent: name, min: 1)
            try self.valueImportanceMap?.forEach {
                try validate($0.key, name: "valueImportanceMap.key", parent: name, max: 50)
                try validate($0.key, name: "valueImportanceMap.key", parent: name, min: 1)
                try validate($0.value, name: "valueImportanceMap[\"\($0.key)\"]", parent: name, max: 10)
                try validate($0.value, name: "valueImportanceMap[\"\($0.key)\"]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case duration = "Duration"
            case freshness = "Freshness"
            case importance = "Importance"
            case rankOrder = "RankOrder"
            case valueImportanceMap = "ValueImportanceMap"
        }
    }

    public struct RelevanceFeedback: AWSEncodableShape {
        /// Whether the document was relevant or not relevant to the search.
        public let relevanceValue: RelevanceType
        /// The identifier of the search result that the user provided relevance feedback for.
        public let resultId: String

        @inlinable
        public init(relevanceValue: RelevanceType, resultId: String) {
            self.relevanceValue = relevanceValue
            self.resultId = resultId
        }

        public func validate(name: String) throws {
            try self.validate(self.resultId, name: "resultId", parent: name, max: 73)
            try self.validate(self.resultId, name: "resultId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case relevanceValue = "RelevanceValue"
            case resultId = "ResultId"
        }
    }

    public struct RetrieveRequest: AWSEncodableShape {
        /// Filters search results by document fields/attributes. You can only provide one attribute filter; however, the AndAllFilters, NotFilter, and OrAllFilters parameters contain a list of other filters. The AttributeFilter parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.  For Amazon Kendra Gen AI Enterprise Edition indices use AttributeFilter to enable document filtering for end users using _email_id or include public documents (_email_id=null).
        public let attributeFilter: AttributeFilter?
        /// Overrides relevance tuning configurations of fields/attributes set at the index level. If you use this API to override the relevance tuning configured at the index level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning. If there is relevance tuning configured for fields at the index level, and you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
        public let documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]?
        /// The identifier of the index to retrieve relevant passages for the search.
        public let indexId: String
        /// Retrieved relevant passages are returned in pages the size of the PageSize parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.
        public let pageNumber: Int?
        /// Sets the number of retrieved relevant passages that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
        public let pageSize: Int?
        /// The input query text to retrieve relevant passages for the search. Amazon Kendra truncates queries at 30 token words, which excludes punctuation and stop words. Truncation still applies if you use Boolean or more advanced, complex queries. For example, Timeoff AND October AND Category:HR is counted as 3 tokens: timeoff, october, hr. For more information, see Searching with advanced query syntax in the Amazon Kendra Developer Guide.
        public let queryText: String
        /// A list of document fields/attributes to include in the response. You can limit the response to include certain document fields. By default, all document fields are included in the response.
        public let requestedDocumentAttributes: [String]?
        /// The user context token or user and group information.
        public let userContext: UserContext?

        @inlinable
        public init(attributeFilter: AttributeFilter? = nil, documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]? = nil, indexId: String, pageNumber: Int? = nil, pageSize: Int? = nil, queryText: String, requestedDocumentAttributes: [String]? = nil, userContext: UserContext? = nil) {
            self.attributeFilter = attributeFilter
            self.documentRelevanceOverrideConfigurations = documentRelevanceOverrideConfigurations
            self.indexId = indexId
            self.pageNumber = pageNumber
            self.pageSize = pageSize
            self.queryText = queryText
            self.requestedDocumentAttributes = requestedDocumentAttributes
            self.userContext = userContext
        }

        public func validate(name: String) throws {
            try self.attributeFilter?.validate(name: "\(name).attributeFilter")
            try self.documentRelevanceOverrideConfigurations?.forEach {
                try $0.validate(name: "\(name).documentRelevanceOverrideConfigurations[]")
            }
            try self.validate(self.documentRelevanceOverrideConfigurations, name: "documentRelevanceOverrideConfigurations", parent: name, max: 500)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.requestedDocumentAttributes?.forEach {
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, max: 200)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, min: 1)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, max: 100)
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, min: 1)
            try self.userContext?.validate(name: "\(name).userContext")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeFilter = "AttributeFilter"
            case documentRelevanceOverrideConfigurations = "DocumentRelevanceOverrideConfigurations"
            case indexId = "IndexId"
            case pageNumber = "PageNumber"
            case pageSize = "PageSize"
            case queryText = "QueryText"
            case requestedDocumentAttributes = "RequestedDocumentAttributes"
            case userContext = "UserContext"
        }
    }

    public struct RetrieveResult: AWSDecodableShape {
        /// The identifier of query used for the search. You also use QueryId to identify the search when using the Submitfeedback API.
        public let queryId: String?
        /// The results of the retrieved relevant passages for the search.
        public let resultItems: [RetrieveResultItem]?

        @inlinable
        public init(queryId: String? = nil, resultItems: [RetrieveResultItem]? = nil) {
            self.queryId = queryId
            self.resultItems = resultItems
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "QueryId"
            case resultItems = "ResultItems"
        }
    }

    public struct RetrieveResultItem: AWSDecodableShape {
        /// The contents of the relevant passage.
        public let content: String?
        /// An array of document fields/attributes assigned to a document in the search results. For example, the document author (_author) or the source URI (_source_uri) of the document.
        public let documentAttributes: [DocumentAttribute]?
        /// The identifier of the document.
        public let documentId: String?
        /// The title of the document.
        public let documentTitle: String?
        /// The URI of the original location of the document.
        public let documentURI: String?
        /// The identifier of the relevant passage result.
        public let id: String?
        /// The confidence score bucket for a retrieved passage result. The confidence bucket provides a relative ranking that indicates how confident Amazon Kendra is that the response is relevant to the query.
        public let scoreAttributes: ScoreAttributes?

        @inlinable
        public init(content: String? = nil, documentAttributes: [DocumentAttribute]? = nil, documentId: String? = nil, documentTitle: String? = nil, documentURI: String? = nil, id: String? = nil, scoreAttributes: ScoreAttributes? = nil) {
            self.content = content
            self.documentAttributes = documentAttributes
            self.documentId = documentId
            self.documentTitle = documentTitle
            self.documentURI = documentURI
            self.id = id
            self.scoreAttributes = scoreAttributes
        }

        private enum CodingKeys: String, CodingKey {
            case content = "Content"
            case documentAttributes = "DocumentAttributes"
            case documentId = "DocumentId"
            case documentTitle = "DocumentTitle"
            case documentURI = "DocumentURI"
            case id = "Id"
            case scoreAttributes = "ScoreAttributes"
        }
    }

    public struct S3DataSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides the path to the S3 bucket that contains the user context filtering files for the data source. For the format of the file, see Access control for S3 data sources.
        public let accessControlListConfiguration: AccessControlListConfiguration?
        /// The name of the bucket that contains the documents.
        public let bucketName: String
        public let documentsMetadataConfiguration: DocumentsMetadataConfiguration?
        /// A list of glob patterns (patterns that can expand a wildcard pattern into a list of path names that match the given pattern) for certain file names and file types to exclude  from your index. If a document matches both an inclusion and exclusion prefix or pattern,  the exclusion prefix takes precendence and the document is not indexed. Examples of glob  patterns include:    /myapp/config/*—All files inside config directory.    **/*.png—All .png files in all directories.    **/*.{png, ico, md}—All .png, .ico or .md files in all directories.    /myapp/src/**/*.ts—All .ts files inside src directory (and all its subdirectories).    **/!(*.module).ts—All .ts files but not .module.ts    *.png , *.jpg—All PNG and JPEG image files in a directory (files with the extensions .png and .jpg).    *internal*—All files in a directory that contain 'internal' in the file name, such as 'internal', 'internal_only', 'company_internal'.    **/*internal*—All internal-related files in a directory and its subdirectories.   For more examples, see Use of Exclude and Include Filters in the Amazon Web Services CLI Command Reference.
        public let exclusionPatterns: [String]?
        /// A list of glob patterns (patterns that can expand a wildcard pattern into a list of path names that match the given pattern) for certain file names and file types to include  in your index. If a document matches both an inclusion and exclusion prefix or pattern,  the exclusion prefix takes precendence and the document is not indexed. Examples of glob  patterns include:    /myapp/config/*—All files inside config directory.    **/*.png—All .png files in all directories.    **/*.{png, ico, md}—All .png, .ico or .md files in all directories.    /myapp/src/**/*.ts—All .ts files inside src directory (and all its subdirectories).    **/!(*.module).ts—All .ts files but not .module.ts    *.png , *.jpg—All PNG and JPEG image files in a directory (files with the extensions .png and .jpg).    *internal*—All files in a directory that contain 'internal' in the file name, such as 'internal', 'internal_only', 'company_internal'.    **/*internal*—All internal-related files in a directory and its subdirectories.   For more examples, see Use of Exclude and Include Filters in the Amazon Web Services CLI Command Reference.
        public let inclusionPatterns: [String]?
        /// A list of S3 prefixes for the documents that should be included in the index.
        public let inclusionPrefixes: [String]?

        @inlinable
        public init(accessControlListConfiguration: AccessControlListConfiguration? = nil, bucketName: String, documentsMetadataConfiguration: DocumentsMetadataConfiguration? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, inclusionPrefixes: [String]? = nil) {
            self.accessControlListConfiguration = accessControlListConfiguration
            self.bucketName = bucketName
            self.documentsMetadataConfiguration = documentsMetadataConfiguration
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.inclusionPrefixes = inclusionPrefixes
        }

        public func validate(name: String) throws {
            try self.accessControlListConfiguration?.validate(name: "\(name).accessControlListConfiguration")
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.documentsMetadataConfiguration?.validate(name: "\(name).documentsMetadataConfiguration")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.inclusionPrefixes?.forEach {
                try validate($0, name: "inclusionPrefixes[]", parent: name, max: 300)
                try validate($0, name: "inclusionPrefixes[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPrefixes, name: "inclusionPrefixes", parent: name, max: 250)
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlListConfiguration = "AccessControlListConfiguration"
            case bucketName = "BucketName"
            case documentsMetadataConfiguration = "DocumentsMetadataConfiguration"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case inclusionPrefixes = "InclusionPrefixes"
        }
    }

    public struct S3Path: AWSEncodableShape & AWSDecodableShape {
        /// The name of the S3 bucket that contains the file.
        public let bucket: String
        /// The name of the file.
        public let key: String

        @inlinable
        public init(bucket: String, key: String) {
            self.bucket = bucket
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct SaaSConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The GitHub host URL or API endpoint URL. For example, https://api.github.com.
        public let hostUrl: String
        /// The name of the organization of the GitHub Enterprise Cloud (SaaS) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting Your organizations under your profile picture dropdown.
        public let organizationName: String

        @inlinable
        public init(hostUrl: String, organizationName: String) {
            self.hostUrl = hostUrl
            self.organizationName = organizationName
        }

        public func validate(name: String) throws {
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, max: 2048)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, min: 1)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.validate(self.organizationName, name: "organizationName", parent: name, max: 60)
            try self.validate(self.organizationName, name: "organizationName", parent: name, min: 1)
            try self.validate(self.organizationName, name: "organizationName", parent: name, pattern: "^[A-Za-z0-9_.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case hostUrl = "HostUrl"
            case organizationName = "OrganizationName"
        }
    }

    public struct SalesforceChatterFeedConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the column in the Salesforce FeedItem table that contains the content to index. Typically this is the Body column.
        public let documentDataFieldName: String
        /// The name of the column in the Salesforce FeedItem table that contains the title of the document. This is typically the Title column.
        public let documentTitleFieldName: String?
        /// Maps fields from a Salesforce chatter feed into Amazon Kendra index fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// Filters the documents in the feed based on status of the user. When you specify ACTIVE_USERS only documents from users who have an active account are indexed. When you specify STANDARD_USER only documents for Salesforce standard users are documented. You can specify both.
        public let includeFilterTypes: [SalesforceChatterFeedIncludeFilterType]?

        @inlinable
        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, includeFilterTypes: [SalesforceChatterFeedIncludeFilterType]? = nil) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.includeFilterTypes = includeFilterTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.includeFilterTypes, name: "includeFilterTypes", parent: name, max: 2)
            try self.validate(self.includeFilterTypes, name: "includeFilterTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case includeFilterTypes = "IncludeFilterTypes"
        }
    }

    public struct SalesforceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information for Salesforce chatter feeds.
        public let chatterFeedConfiguration: SalesforceChatterFeedConfiguration?
        /// Indicates whether Amazon Kendra should index attachments to Salesforce objects.
        public let crawlAttachments: Bool?
        /// A list of regular expression patterns to exclude certain documents in your Salesforce. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The pattern is applied to the name of the attached file.
        public let excludeAttachmentFilePatterns: [String]?
        /// A list of regular expression patterns to include certain documents in your Salesforce. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The pattern is applied to the name of the attached file.
        public let includeAttachmentFilePatterns: [String]?
        /// Configuration information for the knowledge article types that Amazon Kendra indexes. Amazon Kendra indexes standard knowledge articles and the standard fields of knowledge articles, or the custom fields of custom knowledge articles, but not both.
        public let knowledgeArticleConfiguration: SalesforceKnowledgeArticleConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the key/value pairs required to connect to your Salesforce instance. The secret must contain a JSON structure with the following keys:   authenticationUrl - The OAUTH endpoint that Amazon Kendra connects to get an OAUTH token.    consumerKey - The application public key generated when you created your Salesforce application.   consumerSecret - The application private key generated when you created your Salesforce application.   password - The password associated with the user logging in to the Salesforce instance.   securityToken - The token associated with the user logging in to the Salesforce instance.   username - The user name of the user logging in to the Salesforce instance.
        public let secretArn: String
        /// The instance URL for the Salesforce site that you want to index.
        public let serverUrl: String
        /// Configuration information for processing attachments to Salesforce standard objects.
        public let standardObjectAttachmentConfiguration: SalesforceStandardObjectAttachmentConfiguration?
        /// Configuration of the Salesforce standard objects that Amazon Kendra indexes.
        public let standardObjectConfigurations: [SalesforceStandardObjectConfiguration]?

        @inlinable
        public init(chatterFeedConfiguration: SalesforceChatterFeedConfiguration? = nil, crawlAttachments: Bool? = nil, excludeAttachmentFilePatterns: [String]? = nil, includeAttachmentFilePatterns: [String]? = nil, knowledgeArticleConfiguration: SalesforceKnowledgeArticleConfiguration? = nil, secretArn: String, serverUrl: String, standardObjectAttachmentConfiguration: SalesforceStandardObjectAttachmentConfiguration? = nil, standardObjectConfigurations: [SalesforceStandardObjectConfiguration]? = nil) {
            self.chatterFeedConfiguration = chatterFeedConfiguration
            self.crawlAttachments = crawlAttachments
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
            self.knowledgeArticleConfiguration = knowledgeArticleConfiguration
            self.secretArn = secretArn
            self.serverUrl = serverUrl
            self.standardObjectAttachmentConfiguration = standardObjectAttachmentConfiguration
            self.standardObjectConfigurations = standardObjectConfigurations
        }

        public func validate(name: String) throws {
            try self.chatterFeedConfiguration?.validate(name: "\(name).chatterFeedConfiguration")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 250)
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 250)
            try self.knowledgeArticleConfiguration?.validate(name: "\(name).knowledgeArticleConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, max: 2048)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, min: 1)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.standardObjectAttachmentConfiguration?.validate(name: "\(name).standardObjectAttachmentConfiguration")
            try self.standardObjectConfigurations?.forEach {
                try $0.validate(name: "\(name).standardObjectConfigurations[]")
            }
            try self.validate(self.standardObjectConfigurations, name: "standardObjectConfigurations", parent: name, max: 17)
            try self.validate(self.standardObjectConfigurations, name: "standardObjectConfigurations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case chatterFeedConfiguration = "ChatterFeedConfiguration"
            case crawlAttachments = "CrawlAttachments"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
            case knowledgeArticleConfiguration = "KnowledgeArticleConfiguration"
            case secretArn = "SecretArn"
            case serverUrl = "ServerUrl"
            case standardObjectAttachmentConfiguration = "StandardObjectAttachmentConfiguration"
            case standardObjectConfigurations = "StandardObjectConfigurations"
        }
    }

    public struct SalesforceCustomKnowledgeArticleTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the custom knowledge article that contains the document data to index.
        public let documentDataFieldName: String
        /// The name of the field in the custom knowledge article that contains the document title.
        public let documentTitleFieldName: String?
        /// Maps attributes or field names of the custom knowledge article to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Salesforce fields. For more information, see Mapping data source fields. The Salesforce data source field names must exist in your Salesforce custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// The name of the configuration.
        public let name: String

        @inlinable
        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, name: String) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case name = "Name"
        }
    }

    public struct SalesforceKnowledgeArticleConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information for custom Salesforce knowledge articles.
        public let customKnowledgeArticleTypeConfigurations: [SalesforceCustomKnowledgeArticleTypeConfiguration]?
        /// Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must specify at least one state.
        public let includedStates: [SalesforceKnowledgeArticleState]
        /// Configuration information for standard Salesforce knowledge articles.
        public let standardKnowledgeArticleTypeConfiguration: SalesforceStandardKnowledgeArticleTypeConfiguration?

        @inlinable
        public init(customKnowledgeArticleTypeConfigurations: [SalesforceCustomKnowledgeArticleTypeConfiguration]? = nil, includedStates: [SalesforceKnowledgeArticleState], standardKnowledgeArticleTypeConfiguration: SalesforceStandardKnowledgeArticleTypeConfiguration? = nil) {
            self.customKnowledgeArticleTypeConfigurations = customKnowledgeArticleTypeConfigurations
            self.includedStates = includedStates
            self.standardKnowledgeArticleTypeConfiguration = standardKnowledgeArticleTypeConfiguration
        }

        public func validate(name: String) throws {
            try self.customKnowledgeArticleTypeConfigurations?.forEach {
                try $0.validate(name: "\(name).customKnowledgeArticleTypeConfigurations[]")
            }
            try self.validate(self.customKnowledgeArticleTypeConfigurations, name: "customKnowledgeArticleTypeConfigurations", parent: name, max: 10)
            try self.validate(self.customKnowledgeArticleTypeConfigurations, name: "customKnowledgeArticleTypeConfigurations", parent: name, min: 1)
            try self.validate(self.includedStates, name: "includedStates", parent: name, max: 3)
            try self.validate(self.includedStates, name: "includedStates", parent: name, min: 1)
            try self.standardKnowledgeArticleTypeConfiguration?.validate(name: "\(name).standardKnowledgeArticleTypeConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case customKnowledgeArticleTypeConfigurations = "CustomKnowledgeArticleTypeConfigurations"
            case includedStates = "IncludedStates"
            case standardKnowledgeArticleTypeConfiguration = "StandardKnowledgeArticleTypeConfiguration"
        }
    }

    public struct SalesforceStandardKnowledgeArticleTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field that contains the document data to index.
        public let documentDataFieldName: String
        /// The name of the field that contains the document title.
        public let documentTitleFieldName: String?
        /// Maps attributes or field names of the knowledge article to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Salesforce fields. For more information, see Mapping data source fields. The Salesforce data source field names must exist in your Salesforce custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct SalesforceStandardObjectAttachmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field used for the document title.
        public let documentTitleFieldName: String?
        /// One or more objects that map fields in attachments to Amazon Kendra index fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        @inlinable
        public init(documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct SalesforceStandardObjectConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the standard object table that contains the document contents.
        public let documentDataFieldName: String
        /// The name of the field in the standard object table that contains the document title.
        public let documentTitleFieldName: String?
        /// Maps attributes or field names of the standard object to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Salesforce fields. For more information, see Mapping data source fields. The Salesforce data source field names must exist in your Salesforce custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// The name of the standard object.
        public let name: SalesforceStandardObjectName

        @inlinable
        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, name: SalesforceStandardObjectName) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case name = "Name"
        }
    }

    public struct ScoreAttributes: AWSDecodableShape {
        /// A relative ranking for how relevant the response is to the query.
        public let scoreConfidence: ScoreConfidence?

        @inlinable
        public init(scoreConfidence: ScoreConfidence? = nil) {
            self.scoreConfidence = scoreConfidence
        }

        private enum CodingKeys: String, CodingKey {
            case scoreConfidence = "ScoreConfidence"
        }
    }

    public struct Search: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the field is returned in the query response. The default is true.
        public let displayable: Bool?
        /// Indicates that the field can be used to create search facets, a count of results for each value in the field. The default is false .
        public let facetable: Bool?
        /// Determines whether the field is used in the search. If the Searchable field is true, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default is true for string fields and false for number and date fields.
        public let searchable: Bool?
        /// Determines whether the field can be used to sort the results of a query. If you specify sorting on a field that does not have Sortable set to true, Amazon Kendra returns an exception. The default is false.
        public let sortable: Bool?

        @inlinable
        public init(displayable: Bool? = nil, facetable: Bool? = nil, searchable: Bool? = nil, sortable: Bool? = nil) {
            self.displayable = displayable
            self.facetable = facetable
            self.searchable = searchable
            self.sortable = sortable
        }

        private enum CodingKeys: String, CodingKey {
            case displayable = "Displayable"
            case facetable = "Facetable"
            case searchable = "Searchable"
            case sortable = "Sortable"
        }
    }

    public struct SeedUrlConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of seed or starting point URLs of the websites you want to crawl. The list can include a maximum of 100 seed URLs.
        public let seedUrls: [String]
        /// You can choose one of the following modes:    HOST_ONLY—crawl only the website host names. For example, if the seed URL is "abc.example.com", then only URLs with host name "abc.example.com" are crawled.    SUBDOMAINS—crawl the website host names with subdomains. For example, if the seed URL is "abc.example.com", then "a.abc.example.com" and "b.abc.example.com" are also crawled.    EVERYTHING—crawl the website host names with subdomains and other domains that the web pages link to.   The default mode is set to HOST_ONLY.
        public let webCrawlerMode: WebCrawlerMode?

        @inlinable
        public init(seedUrls: [String], webCrawlerMode: WebCrawlerMode? = nil) {
            self.seedUrls = seedUrls
            self.webCrawlerMode = webCrawlerMode
        }

        public func validate(name: String) throws {
            try self.seedUrls.forEach {
                try validate($0, name: "seedUrls[]", parent: name, max: 2048)
                try validate($0, name: "seedUrls[]", parent: name, min: 1)
                try validate($0, name: "seedUrls[]", parent: name, pattern: "^(https?):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.seedUrls, name: "seedUrls", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case seedUrls = "SeedUrls"
            case webCrawlerMode = "WebCrawlerMode"
        }
    }

    public struct ServerSideEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the KMS key. Amazon Kendra doesn't support asymmetric keys.
        public let kmsKeyId: String?

        @inlinable
        public init(kmsKeyId: String? = nil) {
            self.kmsKeyId = kmsKeyId
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
        }
    }

    public struct ServiceNowConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The type of authentication used to connect to the ServiceNow instance. If you choose HTTP_BASIC, Amazon Kendra is authenticated using the user name and password provided in the Secrets Manager secret in the SecretArn field. If you choose OAUTH2, Amazon Kendra is authenticated using the credentials of client ID, client secret, user name and password. When you use OAUTH2 authentication, you must generate a token and a client secret using the ServiceNow console. For more information, see Using a ServiceNow data source.
        public let authenticationType: ServiceNowAuthenticationType?
        /// The ServiceNow instance that the data source connects to. The host endpoint should look like the following: {instance}.service-now.com.
        public let hostUrl: String
        /// Configuration information for crawling knowledge articles in the ServiceNow site.
        public let knowledgeArticleConfiguration: ServiceNowKnowledgeArticleConfiguration?
        /// The Amazon Resource Name (ARN) of the Secrets Manager secret that contains the user name and password required to connect to the ServiceNow instance. You can also provide OAuth authentication credentials of user name, password, client ID, and client secret. For more information, see Using a ServiceNow data source.
        public let secretArn: String
        /// Configuration information for crawling service catalogs in the ServiceNow site.
        public let serviceCatalogConfiguration: ServiceNowServiceCatalogConfiguration?
        /// The identifier of the release that the ServiceNow host is running. If the host is not running the LONDON release, use OTHERS.
        public let serviceNowBuildVersion: ServiceNowBuildVersionType

        @inlinable
        public init(authenticationType: ServiceNowAuthenticationType? = nil, hostUrl: String, knowledgeArticleConfiguration: ServiceNowKnowledgeArticleConfiguration? = nil, secretArn: String, serviceCatalogConfiguration: ServiceNowServiceCatalogConfiguration? = nil, serviceNowBuildVersion: ServiceNowBuildVersionType) {
            self.authenticationType = authenticationType
            self.hostUrl = hostUrl
            self.knowledgeArticleConfiguration = knowledgeArticleConfiguration
            self.secretArn = secretArn
            self.serviceCatalogConfiguration = serviceCatalogConfiguration
            self.serviceNowBuildVersion = serviceNowBuildVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, max: 2048)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, min: 1)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, pattern: "^(?!(^(https?|ftp|file):\\/\\/))[a-z0-9-]+(\\.service-now\\.com)$")
            try self.knowledgeArticleConfiguration?.validate(name: "\(name).knowledgeArticleConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.serviceCatalogConfiguration?.validate(name: "\(name).serviceCatalogConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationType = "AuthenticationType"
            case hostUrl = "HostUrl"
            case knowledgeArticleConfiguration = "KnowledgeArticleConfiguration"
            case secretArn = "SecretArn"
            case serviceCatalogConfiguration = "ServiceCatalogConfiguration"
            case serviceNowBuildVersion = "ServiceNowBuildVersion"
        }
    }

    public struct ServiceNowKnowledgeArticleConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to index attachments to knowledge articles.
        public let crawlAttachments: Bool?
        /// The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
        public let documentDataFieldName: String
        /// The name of the ServiceNow field that is mapped to the index document title field.
        public let documentTitleFieldName: String?
        /// A list of regular expression patterns applied to exclude certain knowledge article attachments. Attachments that match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
        public let excludeAttachmentFilePatterns: [String]?
        /// Maps attributes or field names of knoweldge articles to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to ServiceNow fields. For more information, see Mapping data source fields. The ServiceNow data source field names must exist in your ServiceNow custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A query that selects the knowledge articles to index. The query can return articles from multiple knowledge bases, and the knowledge bases can be public or private. The query string must be one generated by the ServiceNow console. For more information, see Specifying documents to index with a query.
        public let filterQuery: String?
        /// A list of regular expression patterns applied to include knowledge article attachments. Attachments that match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
        public let includeAttachmentFilePatterns: [String]?

        @inlinable
        public init(crawlAttachments: Bool? = nil, documentDataFieldName: String, documentTitleFieldName: String? = nil, excludeAttachmentFilePatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, filterQuery: String? = nil, includeAttachmentFilePatterns: [String]? = nil) {
            self.crawlAttachments = crawlAttachments
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.fieldMappings = fieldMappings
            self.filterQuery = filterQuery
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, max: 2048)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, min: 1)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, pattern: "^\\P{C}*$")
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 250)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlAttachments = "CrawlAttachments"
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case fieldMappings = "FieldMappings"
            case filterQuery = "FilterQuery"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
        }
    }

    public struct ServiceNowServiceCatalogConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to index attachments to service catalog items.
        public let crawlAttachments: Bool?
        /// The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
        public let documentDataFieldName: String
        /// The name of the ServiceNow field that is mapped to the index document title field.
        public let documentTitleFieldName: String?
        /// A list of regular expression patterns to exclude certain attachments of catalogs in your ServiceNow. Item that match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index. The regex is applied to the file name of the attachment.
        public let excludeAttachmentFilePatterns: [String]?
        /// Maps attributes or field names of catalogs to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to ServiceNow fields. For more information, see Mapping data source fields. The ServiceNow data source field names must exist in your ServiceNow custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain attachments of catalogs in your ServiceNow. Item that match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index. The regex is applied to the file name of the attachment.
        public let includeAttachmentFilePatterns: [String]?

        @inlinable
        public init(crawlAttachments: Bool? = nil, documentDataFieldName: String, documentTitleFieldName: String? = nil, excludeAttachmentFilePatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, includeAttachmentFilePatterns: [String]? = nil) {
            self.crawlAttachments = crawlAttachments
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.fieldMappings = fieldMappings
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 300)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 250)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlAttachments = "CrawlAttachments"
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case fieldMappings = "FieldMappings"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
        }
    }

    public struct SharePointConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Whether you want to connect to SharePoint Online using basic authentication of user name and password, or OAuth authentication of user name, password, client ID, and client secret, or AD App-only authentication of client secret.
        public let authenticationType: SharePointOnlineAuthenticationType?
        ///  TRUE to index document attachments.
        public let crawlAttachments: Bool?
        ///  TRUE to disable local groups information.
        public let disableLocalGroups: Bool?
        /// The Microsoft SharePoint attribute field that contains the title of the document.
        public let documentTitleFieldName: String?
        /// A list of regular expression patterns to exclude certain documents in your SharePoint. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The regex applies to the display URL of the SharePoint document.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map SharePoint data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to SharePoint fields. For more information, see Mapping data source fields. The SharePoint data source field names must exist in your SharePoint custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain documents in your SharePoint. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index. The regex applies to the display URL of the SharePoint document.
        public let inclusionPatterns: [String]?
        /// Configuration information to connect to your Microsoft SharePoint site URLs via instance via a web proxy. You can use this option for SharePoint Server. You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic authentication of user name and password. To store web proxy credentials, you use a secret in Secrets Manager. It is recommended that you follow best security practices when configuring your web proxy. This includes setting up throttling, setting up logging and monitoring, and applying security patches on a regular basis. If you use your web proxy with multiple data sources, sync jobs that occur at the same time could strain the load on your proxy. It is recommended you prepare your proxy beforehand for any security and load requirements.
        public let proxyConfiguration: ProxyConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the user name and password required to connect to the SharePoint instance. For more information, see Microsoft SharePoint.
        public let secretArn: String
        /// The version of Microsoft SharePoint that you use.
        public let sharePointVersion: SharePointVersion
        /// The path to the SSL certificate stored in an Amazon S3 bucket. You use this to connect to SharePoint Server if you require a secure SSL connection. You can generate a self-signed X509 certificate on any computer using OpenSSL. For an example of using OpenSSL to create an X509 certificate, see Create and sign an X509 certificate.
        public let sslCertificateS3Path: S3Path?
        /// The Microsoft SharePoint site URLs for the documents you want to index.
        public let urls: [String]
        ///  TRUE to use the SharePoint change log to determine which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in SharePoint.
        public let useChangeLog: Bool?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Microsoft SharePoint. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(authenticationType: SharePointOnlineAuthenticationType? = nil, crawlAttachments: Bool? = nil, disableLocalGroups: Bool? = nil, documentTitleFieldName: String? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, proxyConfiguration: ProxyConfiguration? = nil, secretArn: String, sharePointVersion: SharePointVersion, sslCertificateS3Path: S3Path? = nil, urls: [String], useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.authenticationType = authenticationType
            self.crawlAttachments = crawlAttachments
            self.disableLocalGroups = disableLocalGroups
            self.documentTitleFieldName = documentTitleFieldName
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.proxyConfiguration = proxyConfiguration
            self.secretArn = secretArn
            self.sharePointVersion = sharePointVersion
            self.sslCertificateS3Path = sslCertificateS3Path
            self.urls = urls
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.proxyConfiguration?.validate(name: "\(name).proxyConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sslCertificateS3Path?.validate(name: "\(name).sslCertificateS3Path")
            try self.urls.forEach {
                try validate($0, name: "urls[]", parent: name, max: 2048)
                try validate($0, name: "urls[]", parent: name, min: 1)
                try validate($0, name: "urls[]", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.urls, name: "urls", parent: name, max: 100)
            try self.validate(self.urls, name: "urls", parent: name, min: 1)
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationType = "AuthenticationType"
            case crawlAttachments = "CrawlAttachments"
            case disableLocalGroups = "DisableLocalGroups"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case proxyConfiguration = "ProxyConfiguration"
            case secretArn = "SecretArn"
            case sharePointVersion = "SharePointVersion"
            case sslCertificateS3Path = "SslCertificateS3Path"
            case urls = "Urls"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct SiteMapsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of sitemap URLs of the websites you want to crawl. The list can include a maximum of three sitemap URLs.
        public let siteMaps: [String]

        @inlinable
        public init(siteMaps: [String]) {
            self.siteMaps = siteMaps
        }

        public func validate(name: String) throws {
            try self.siteMaps.forEach {
                try validate($0, name: "siteMaps[]", parent: name, max: 2048)
                try validate($0, name: "siteMaps[]", parent: name, min: 1)
                try validate($0, name: "siteMaps[]", parent: name, pattern: "^(https?):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.siteMaps, name: "siteMaps", parent: name, max: 3)
        }

        private enum CodingKeys: String, CodingKey {
            case siteMaps = "SiteMaps"
        }
    }

    public struct SlackConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to index bot messages from your Slack workspace team.
        public let crawlBotMessage: Bool?
        ///  TRUE to exclude archived messages to index from your Slack workspace team.
        public let excludeArchived: Bool?
        /// A list of regular expression patterns to exclude certain attached files in your Slack workspace team. Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map Slack data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to Slack fields. For more information, see Mapping data source fields. The Slack data source field names must exist in your Slack custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain attached files in your Slack workspace team. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
        public let inclusionPatterns: [String]?
        /// The number of hours for change log to look back from when you last synchronized your data. You can look back up to 7 days or 168 hours. Change log updates your index only if new content was added since you last synced your data. Updated or deleted content from before you last synced does not get updated in your index. To capture updated or deleted content before you last synced, set the LookBackPeriod to the number of hours you want change log to look back.
        public let lookBackPeriod: Int?
        /// The list of private channel names from your Slack workspace team. You use this if you want to index specific private channels, not all private channels. You can also use regular expression patterns to filter private channels.
        public let privateChannelFilter: [String]?
        /// The list of public channel names to index from your Slack workspace team. You use this if you want to index specific public channels, not all public channels. You can also use regular expression patterns to filter public channels.
        public let publicChannelFilter: [String]?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your Slack workspace team. The secret must contain a JSON structure with the following keys:   slackToken—The user or bot token created in Slack. For more information on creating a token in Slack, see Authentication for a Slack data source.
        public let secretArn: String
        /// The date to start crawling your data from your Slack workspace team. The date must follow this format: yyyy-mm-dd.
        public let sinceCrawlDate: String
        /// Specify whether to index public channels, private channels, group messages, and direct messages. You can specify one or more of these options.
        public let slackEntityList: [SlackEntity]
        /// The identifier of the team in the Slack workspace. For example, T0123456789. You can find your team ID in the URL of the main page of your Slack workspace. When you log in to Slack via a browser, you are directed to the URL of the main page. For example, https://app.slack.com/client/T0123456789/....
        public let teamId: String
        ///  TRUE to use the Slack change log to determine which documents require updating in the index. Depending on the Slack change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in Slack.
        public let useChangeLog: Bool?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your Slack. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(crawlBotMessage: Bool? = nil, excludeArchived: Bool? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, lookBackPeriod: Int? = nil, privateChannelFilter: [String]? = nil, publicChannelFilter: [String]? = nil, secretArn: String, sinceCrawlDate: String, slackEntityList: [SlackEntity], teamId: String, useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.crawlBotMessage = crawlBotMessage
            self.excludeArchived = excludeArchived
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.lookBackPeriod = lookBackPeriod
            self.privateChannelFilter = privateChannelFilter
            self.publicChannelFilter = publicChannelFilter
            self.secretArn = secretArn
            self.sinceCrawlDate = sinceCrawlDate
            self.slackEntityList = slackEntityList
            self.teamId = teamId
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.lookBackPeriod, name: "lookBackPeriod", parent: name, max: 168)
            try self.validate(self.lookBackPeriod, name: "lookBackPeriod", parent: name, min: 0)
            try self.privateChannelFilter?.forEach {
                try validate($0, name: "privateChannelFilter[]", parent: name, max: 2048)
                try validate($0, name: "privateChannelFilter[]", parent: name, min: 1)
            }
            try self.publicChannelFilter?.forEach {
                try validate($0, name: "publicChannelFilter[]", parent: name, max: 2048)
                try validate($0, name: "publicChannelFilter[]", parent: name, min: 1)
            }
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.sinceCrawlDate, name: "sinceCrawlDate", parent: name, max: 10)
            try self.validate(self.sinceCrawlDate, name: "sinceCrawlDate", parent: name, min: 10)
            try self.validate(self.sinceCrawlDate, name: "sinceCrawlDate", parent: name, pattern: "^(20\\d{2})-(0?[1-9]|1[0-2])-(0?[1-9]|1\\d|2\\d|3[01])$")
            try self.validate(self.slackEntityList, name: "slackEntityList", parent: name, max: 4)
            try self.validate(self.slackEntityList, name: "slackEntityList", parent: name, min: 1)
            try self.validate(self.teamId, name: "teamId", parent: name, max: 64)
            try self.validate(self.teamId, name: "teamId", parent: name, min: 1)
            try self.validate(self.teamId, name: "teamId", parent: name, pattern: "^[A-Z0-9]*$")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case crawlBotMessage = "CrawlBotMessage"
            case excludeArchived = "ExcludeArchived"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case lookBackPeriod = "LookBackPeriod"
            case privateChannelFilter = "PrivateChannelFilter"
            case publicChannelFilter = "PublicChannelFilter"
            case secretArn = "SecretArn"
            case sinceCrawlDate = "SinceCrawlDate"
            case slackEntityList = "SlackEntityList"
            case teamId = "TeamId"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct SortingConfiguration: AWSEncodableShape {
        /// The name of the document attribute used to sort the response. You can use any field that has the Sortable flag set to true. You can also sort by any of the following built-in attributes:   _category   _created_at   _last_updated_at   _version   _view_count
        public let documentAttributeKey: String
        /// The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
        public let sortOrder: SortOrder

        @inlinable
        public init(documentAttributeKey: String, sortOrder: SortOrder) {
            self.documentAttributeKey = documentAttributeKey
            self.sortOrder = sortOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, max: 200)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, min: 1)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case sortOrder = "SortOrder"
        }
    }

    public struct SourceDocument: AWSDecodableShape {
        /// The additional fields/attributes to include in the response. You can use additional  fields to provide extra information in the response. Additional fields are not used  to based suggestions on.
        public let additionalAttributes: [DocumentAttribute]?
        /// The identifier of the document used for a query suggestion.
        public let documentId: String?
        /// The document fields/attributes used for a query suggestion.
        public let suggestionAttributes: [String]?

        @inlinable
        public init(additionalAttributes: [DocumentAttribute]? = nil, documentId: String? = nil, suggestionAttributes: [String]? = nil) {
            self.additionalAttributes = additionalAttributes
            self.documentId = documentId
            self.suggestionAttributes = suggestionAttributes
        }

        private enum CodingKeys: String, CodingKey {
            case additionalAttributes = "AdditionalAttributes"
            case documentId = "DocumentId"
            case suggestionAttributes = "SuggestionAttributes"
        }
    }

    public struct SpellCorrectedQuery: AWSDecodableShape {
        /// The corrected misspelled word or words in a query.
        public let corrections: [Correction]?
        /// The query with the suggested spell corrections.
        public let suggestedQueryText: String?

        @inlinable
        public init(corrections: [Correction]? = nil, suggestedQueryText: String? = nil) {
            self.corrections = corrections
            self.suggestedQueryText = suggestedQueryText
        }

        private enum CodingKeys: String, CodingKey {
            case corrections = "Corrections"
            case suggestedQueryText = "SuggestedQueryText"
        }
    }

    public struct SpellCorrectionConfiguration: AWSEncodableShape {
        ///  TRUE to suggest spell corrections for queries.
        public let includeQuerySpellCheckSuggestions: Bool

        @inlinable
        public init(includeQuerySpellCheckSuggestions: Bool = false) {
            self.includeQuerySpellCheckSuggestions = includeQuerySpellCheckSuggestions
        }

        private enum CodingKeys: String, CodingKey {
            case includeQuerySpellCheckSuggestions = "IncludeQuerySpellCheckSuggestions"
        }
    }

    public struct SqlConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether Amazon Kendra encloses SQL identifiers for tables and column names in double quotes (") when making a database query. By default, Amazon Kendra passes SQL identifiers the way that they are entered into the data source configuration. It does not change the case of identifiers or enclose them in quotes. PostgreSQL internally converts uppercase characters to lower case characters in identifiers unless they are quoted. Choosing this option encloses identifiers in quotes so that PostgreSQL does not convert the character's case. For MySQL databases, you must enable the ansi_quotes option when you set this field to DOUBLE_QUOTES.
        public let queryIdentifiersEnclosingOption: QueryIdentifiersEnclosingOption?

        @inlinable
        public init(queryIdentifiersEnclosingOption: QueryIdentifiersEnclosingOption? = nil) {
            self.queryIdentifiersEnclosingOption = queryIdentifiersEnclosingOption
        }

        private enum CodingKeys: String, CodingKey {
            case queryIdentifiersEnclosingOption = "QueryIdentifiersEnclosingOption"
        }
    }

    public struct StartDataSourceSyncJobRequest: AWSEncodableShape {
        /// The identifier of the data source connector to synchronize.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct StartDataSourceSyncJobResponse: AWSDecodableShape {
        /// Identifies a particular synchronization job.
        public let executionId: String?

        @inlinable
        public init(executionId: String? = nil) {
            self.executionId = executionId
        }

        private enum CodingKeys: String, CodingKey {
            case executionId = "ExecutionId"
        }
    }

    public struct Status: AWSDecodableShape {
        /// The identifier of the document.
        public let documentId: String?
        /// The current status of a document. If the document was submitted for deletion, the status is NOT_FOUND after the document is deleted.
        public let documentStatus: DocumentStatus?
        /// Indicates the source of the error.
        public let failureCode: String?
        /// Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.
        public let failureReason: String?

        @inlinable
        public init(documentId: String? = nil, documentStatus: DocumentStatus? = nil, failureCode: String? = nil, failureReason: String? = nil) {
            self.documentId = documentId
            self.documentStatus = documentStatus
            self.failureCode = failureCode
            self.failureReason = failureReason
        }

        private enum CodingKeys: String, CodingKey {
            case documentId = "DocumentId"
            case documentStatus = "DocumentStatus"
            case failureCode = "FailureCode"
            case failureReason = "FailureReason"
        }
    }

    public struct StopDataSourceSyncJobRequest: AWSEncodableShape {
        /// The identifier of the data source connector for which to stop the synchronization jobs.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String

        @inlinable
        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct SubmitFeedbackRequest: AWSEncodableShape {
        /// Tells Amazon Kendra that a particular search result link was chosen by the user.
        public let clickFeedbackItems: [ClickFeedback]?
        /// The identifier of the index that was queried.
        public let indexId: String
        /// The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the Query API.
        public let queryId: String
        /// Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.
        public let relevanceFeedbackItems: [RelevanceFeedback]?

        @inlinable
        public init(clickFeedbackItems: [ClickFeedback]? = nil, indexId: String, queryId: String, relevanceFeedbackItems: [RelevanceFeedback]? = nil) {
            self.clickFeedbackItems = clickFeedbackItems
            self.indexId = indexId
            self.queryId = queryId
            self.relevanceFeedbackItems = relevanceFeedbackItems
        }

        public func validate(name: String) throws {
            try self.clickFeedbackItems?.forEach {
                try $0.validate(name: "\(name).clickFeedbackItems[]")
            }
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
            try self.validate(self.queryId, name: "queryId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.relevanceFeedbackItems?.forEach {
                try $0.validate(name: "\(name).relevanceFeedbackItems[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clickFeedbackItems = "ClickFeedbackItems"
            case indexId = "IndexId"
            case queryId = "QueryId"
            case relevanceFeedbackItems = "RelevanceFeedbackItems"
        }
    }

    public struct SuggestableConfig: AWSEncodableShape & AWSDecodableShape {
        /// The name of the document field/attribute.
        public let attributeName: String?
        ///  TRUE means the document field/attribute is suggestible, so the contents within the  field can be used for query suggestions.
        public let suggestable: Bool?

        @inlinable
        public init(attributeName: String? = nil, suggestable: Bool? = nil) {
            self.attributeName = attributeName
            self.suggestable = suggestable
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 200)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case suggestable = "Suggestable"
        }
    }

    public struct Suggestion: AWSDecodableShape {
        /// The UUID (universally unique identifier) of a single  query suggestion.
        public let id: String?
        /// The list of document IDs and their fields/attributes that are used for a  single query suggestion, if document fields set to use for query suggestions.
        public let sourceDocuments: [SourceDocument]?
        /// The value for the UUID (universally unique identifier)  of a single query suggestion. The value is the text string of a suggestion.
        public let value: SuggestionValue?

        @inlinable
        public init(id: String? = nil, sourceDocuments: [SourceDocument]? = nil, value: SuggestionValue? = nil) {
            self.id = id
            self.sourceDocuments = sourceDocuments
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case sourceDocuments = "SourceDocuments"
            case value = "Value"
        }
    }

    public struct SuggestionHighlight: AWSDecodableShape {
        /// The zero-based location in the response string where the highlight starts.
        public let beginOffset: Int?
        /// The zero-based location in the response string where the highlight ends.
        public let endOffset: Int?

        @inlinable
        public init(beginOffset: Int? = nil, endOffset: Int? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
        }
    }

    public struct SuggestionTextWithHighlights: AWSDecodableShape {
        /// The beginning and end of the query suggestion text that should be highlighted.
        public let highlights: [SuggestionHighlight]?
        /// The query suggestion text to display to the user.
        public let text: String?

        @inlinable
        public init(highlights: [SuggestionHighlight]? = nil, text: String? = nil) {
            self.highlights = highlights
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case highlights = "Highlights"
            case text = "Text"
        }
    }

    public struct SuggestionValue: AWSDecodableShape {
        /// The SuggestionTextWithHighlights structure that contains  the query suggestion text and highlights.
        public let text: SuggestionTextWithHighlights?

        @inlinable
        public init(text: SuggestionTextWithHighlights? = nil) {
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case text = "Text"
        }
    }

    public struct TableCell: AWSDecodableShape {
        ///  TRUE means that the table cell should be treated as a header.
        public let header: Bool?
        ///  TRUE means that the table cell has a high enough confidence and is relevant to the query, so the value or content should be highlighted.
        public let highlighted: Bool?
        ///  TRUE if the response of the table cell is the top answer. This is the cell value or content with the highest confidence score or is the most relevant to the query.
        public let topAnswer: Bool?
        /// The actual value or content within a table cell. A table cell could contain a date value of a year, or a string value of text, for example.
        public let value: String?

        @inlinable
        public init(header: Bool? = nil, highlighted: Bool? = nil, topAnswer: Bool? = nil, value: String? = nil) {
            self.header = header
            self.highlighted = highlighted
            self.topAnswer = topAnswer
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case header = "Header"
            case highlighted = "Highlighted"
            case topAnswer = "TopAnswer"
            case value = "Value"
        }
    }

    public struct TableExcerpt: AWSDecodableShape {
        /// A list of rows in the table excerpt.
        public let rows: [TableRow]?
        /// A count of the number of rows in the original table within the document.
        public let totalNumberOfRows: Int?

        @inlinable
        public init(rows: [TableRow]? = nil, totalNumberOfRows: Int? = nil) {
            self.rows = rows
            self.totalNumberOfRows = totalNumberOfRows
        }

        private enum CodingKeys: String, CodingKey {
            case rows = "Rows"
            case totalNumberOfRows = "TotalNumberOfRows"
        }
    }

    public struct TableRow: AWSDecodableShape {
        /// A list of table cells in a row.
        public let cells: [TableCell]?

        @inlinable
        public init(cells: [TableCell]? = nil) {
            self.cells = cells
        }

        private enum CodingKeys: String, CodingKey {
            case cells = "Cells"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ,  data source, or other resource.
        public let key: String
        /// The value associated with the tag. The value may be an empty string but it can't be null.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, data source, or other resource to add a tag.  For example, the ARN of an index is constructed as follows:  arn:aws:kendra:your-region:your-account-id:index/index-id   For information on how to construct an ARN for all types of Amazon Kendra resources, see  Resource  types.
        public let resourceARN: String
        /// A list of tag keys to add to the index, FAQ, data source, or other resource. If a tag already  exists, the existing value is replaced with the new value.
        public let tags: [Tag]

        @inlinable
        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TemplateConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The template schema used for the data source, where templates schemas are supported. See Data source template schemas.
        public let template: AWSDocument?

        @inlinable
        public init(template: AWSDocument? = nil) {
            self.template = template
        }

        private enum CodingKeys: String, CodingKey {
            case template = "Template"
        }
    }

    public struct TextDocumentStatistics: AWSDecodableShape {
        /// The total size, in bytes, of the indexed documents.
        public let indexedTextBytes: Int64
        /// The number of text documents indexed.
        public let indexedTextDocumentsCount: Int

        @inlinable
        public init(indexedTextBytes: Int64, indexedTextDocumentsCount: Int) {
            self.indexedTextBytes = indexedTextBytes
            self.indexedTextDocumentsCount = indexedTextDocumentsCount
        }

        private enum CodingKeys: String, CodingKey {
            case indexedTextBytes = "IndexedTextBytes"
            case indexedTextDocumentsCount = "IndexedTextDocumentsCount"
        }
    }

    public struct TextWithHighlights: AWSDecodableShape {
        /// The beginning and end of the text that should be highlighted.
        public let highlights: [Highlight]?
        /// The text to display to the user.
        public let text: String?

        @inlinable
        public init(highlights: [Highlight]? = nil, text: String? = nil) {
            self.highlights = highlights
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case highlights = "Highlights"
            case text = "Text"
        }
    }

    public struct ThesaurusSummary: AWSDecodableShape {
        /// The Unix timestamp when the thesaurus was created.
        public let createdAt: Date?
        /// The identifier of the thesaurus.
        public let id: String?
        /// The name of the thesaurus.
        public let name: String?
        /// The status of the thesaurus.
        public let status: ThesaurusStatus?
        /// The Unix timestamp when the thesaurus was last updated.
        public let updatedAt: Date?

        @inlinable
        public init(createdAt: Date? = nil, id: String? = nil, name: String? = nil, status: ThesaurusStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct TimeRange: AWSEncodableShape & AWSDecodableShape {
        /// The Unix timestamp for the end of the time range.
        public let endTime: Date?
        /// The Unix timestamp for the beginning of the time range.
        public let startTime: Date?

        @inlinable
        public init(endTime: Date? = nil, startTime: Date? = nil) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case startTime = "StartTime"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, data source, or other resource to remove a tag.  For example, the ARN of an index is constructed as follows:  arn:aws:kendra:your-region:your-account-id:index/index-id  For information on how to construct an ARN for all types of Amazon Kendra resources, see  Resource  types.
        public let resourceARN: String
        /// A list of tag keys to remove from the index, FAQ, data source, or other resource. If a tag  key doesn't exist for the resource, it is ignored.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAccessControlConfigurationRequest: AWSEncodableShape {
        /// Information you want to update on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
        public let accessControlList: [Principal]?
        /// A new description for the access control configuration.
        public let description: String?
        /// The updated list of principal lists that define the hierarchy for which documents users should have access to.
        public let hierarchicalAccessControlList: [HierarchicalPrincipal]?
        /// The identifier of the access control configuration you want to update.
        public let id: String
        /// The identifier of the index for an access control configuration.
        public let indexId: String
        /// A new name for the access control configuration.
        public let name: String?

        @inlinable
        public init(accessControlList: [Principal]? = nil, description: String? = nil, hierarchicalAccessControlList: [HierarchicalPrincipal]? = nil, id: String, indexId: String, name: String? = nil) {
            self.accessControlList = accessControlList
            self.description = description
            self.hierarchicalAccessControlList = hierarchicalAccessControlList
            self.id = id
            self.indexId = indexId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.accessControlList?.forEach {
                try $0.validate(name: "\(name).accessControlList[]")
            }
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.hierarchicalAccessControlList?.forEach {
                try $0.validate(name: "\(name).hierarchicalAccessControlList[]")
            }
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, max: 30)
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\S\\s]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlList = "AccessControlList"
            case description = "Description"
            case hierarchicalAccessControlList = "HierarchicalAccessControlList"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
        }
    }

    public struct UpdateAccessControlConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDataSourceRequest: AWSEncodableShape {
        /// Configuration information you want to update for the data source connector.
        public let configuration: DataSourceConfiguration?
        /// Configuration information you want to update for altering document metadata and content during the document ingestion process. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// A new description for the data source connector.
        public let description: String?
        /// The identifier of the data source connector you want to update.
        public let id: String
        /// The identifier of the index used with the data source connector.
        public let indexId: String
        /// The code for a language you want to update for the data source connector.  This allows you to support a language for all  documents when updating the data source. English is supported  by default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// A new name for the data source connector.
        public let name: String?
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access  the data source and required resources. For more information, see IAM roles for Amazon Kendra.
        public let roleArn: String?
        /// The sync schedule you want to update for the data source connector.
        public let schedule: String?
        /// Configuration information for an Amazon Virtual Private Cloud to connect to your data source. For more information, see Configuring a VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        @inlinable
        public init(configuration: DataSourceConfiguration? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, id: String, indexId: String, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, schedule: String? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.configuration = configuration
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.configuration?.validate(name: "\(name).configuration")
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct UpdateExperienceRequest: AWSEncodableShape {
        /// Configuration information you want to update for your Amazon Kendra experience.
        public let configuration: ExperienceConfiguration?
        /// A new description for your Amazon Kendra experience.
        public let description: String?
        /// The identifier of your Amazon Kendra experience you want to update.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// A new name for your Amazon Kendra experience.
        public let name: String?
        /// The Amazon Resource Name (ARN) of an IAM role with permission to access  the Query API, QuerySuggestions API, SubmitFeedback API, and IAM Identity Center that stores your users and groups information.  For more information, see IAM roles for Amazon Kendra.
        public let roleArn: String?

        @inlinable
        public init(configuration: ExperienceConfiguration? = nil, description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil) {
            self.configuration = configuration
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.configuration?.validate(name: "\(name).configuration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
        }
    }

    public struct UpdateFeaturedResultsSetRequest: AWSEncodableShape {
        /// A new description for the set of featured results.
        public let description: String?
        /// A list of document IDs for the documents you want to feature at the  top of the search results page. For more information on the list of  featured documents, see FeaturedResultsSet.
        public let featuredDocuments: [FeaturedDocument]?
        /// The identifier of the set of featured results that you want to update.
        public let featuredResultsSetId: String
        /// A new name for the set of featured results.
        public let featuredResultsSetName: String?
        /// The identifier of the index used for featuring results.
        public let indexId: String
        /// A list of queries for featuring results. For more information on the  list of queries, see FeaturedResultsSet.
        public let queryTexts: [String]?
        /// You can set the status to ACTIVE or INACTIVE.  When the value is ACTIVE, featured results are ready for  use. You can still configure your settings before setting the status  to ACTIVE. The queries you specify for featured results  must be unique per featured results set for each index, whether the  status is ACTIVE or INACTIVE.
        public let status: FeaturedResultsSetStatus?

        @inlinable
        public init(description: String? = nil, featuredDocuments: [FeaturedDocument]? = nil, featuredResultsSetId: String, featuredResultsSetName: String? = nil, indexId: String, queryTexts: [String]? = nil, status: FeaturedResultsSetStatus? = nil) {
            self.description = description
            self.featuredDocuments = featuredDocuments
            self.featuredResultsSetId = featuredResultsSetId
            self.featuredResultsSetName = featuredResultsSetName
            self.indexId = indexId
            self.queryTexts = queryTexts
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.featuredDocuments?.forEach {
                try $0.validate(name: "\(name).featuredDocuments[]")
            }
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, max: 36)
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, min: 36)
            try self.validate(self.featuredResultsSetId, name: "featuredResultsSetId", parent: name, pattern: "^[a-zA-Z-0-9]*$")
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, max: 1000)
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, min: 1)
            try self.validate(self.featuredResultsSetName, name: "featuredResultsSetName", parent: name, pattern: "^[a-zA-Z0-9][ a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryTexts, name: "queryTexts", parent: name, max: 49)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case featuredDocuments = "FeaturedDocuments"
            case featuredResultsSetId = "FeaturedResultsSetId"
            case featuredResultsSetName = "FeaturedResultsSetName"
            case indexId = "IndexId"
            case queryTexts = "QueryTexts"
            case status = "Status"
        }
    }

    public struct UpdateFeaturedResultsSetResponse: AWSDecodableShape {
        /// Information on the set of featured results. This includes the identifier  of the featured results set, whether the featured results set is active or inactive, when the featured results set was last updated, and more.
        public let featuredResultsSet: FeaturedResultsSet?

        @inlinable
        public init(featuredResultsSet: FeaturedResultsSet? = nil) {
            self.featuredResultsSet = featuredResultsSet
        }

        private enum CodingKeys: String, CodingKey {
            case featuredResultsSet = "FeaturedResultsSet"
        }
    }

    public struct UpdateIndexRequest: AWSEncodableShape {
        /// Sets the number of additional document storage and query capacity units that should be used by the index. You can change the capacity of the index up to 5 times per day, or make 5 API calls. If you are using extra storage units, you can't reduce the storage capacity below what is required to meet the storage needs for your index.
        public let capacityUnits: CapacityUnitsConfiguration?
        /// A new description for the index.
        public let description: String?
        /// The document metadata configuration you want to update for the index. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document.
        public let documentMetadataConfigurationUpdates: [DocumentMetadataConfiguration]?
        /// The identifier of the index you want to update.
        public let id: String
        /// A new name for the index.
        public let name: String?
        /// An Identity and Access Management (IAM) role that gives Amazon Kendra permission to access Amazon CloudWatch logs and metrics.
        public let roleArn: String?
        /// The user context policy.  If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use ATTRIBUTE_FILTER to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use USER_TOKEN to configure user context policy, Amazon Kendra returns a ValidationException error.
        public let userContextPolicy: UserContextPolicy?
        /// Gets users and groups from IAM Identity Center identity source. To configure this, see UserGroupResolutionConfiguration. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.  If you're using an Amazon Kendra Gen AI Enterprise Edition index, UserGroupResolutionConfiguration isn't supported.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration.  If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use UserTokenConfigurations to configure user context policy, Amazon Kendra returns a ValidationException error.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        @inlinable
        public init(capacityUnits: CapacityUnitsConfiguration? = nil, description: String? = nil, documentMetadataConfigurationUpdates: [DocumentMetadataConfiguration]? = nil, id: String, name: String? = nil, roleArn: String? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.capacityUnits = capacityUnits
            self.description = description
            self.documentMetadataConfigurationUpdates = documentMetadataConfigurationUpdates
            self.id = id
            self.name = name
            self.roleArn = roleArn
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        public func validate(name: String) throws {
            try self.capacityUnits?.validate(name: "\(name).capacityUnits")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.documentMetadataConfigurationUpdates?.forEach {
                try $0.validate(name: "\(name).documentMetadataConfigurationUpdates[]")
            }
            try self.validate(self.documentMetadataConfigurationUpdates, name: "documentMetadataConfigurationUpdates", parent: name, max: 500)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.userTokenConfigurations?.forEach {
                try $0.validate(name: "\(name).userTokenConfigurations[]")
            }
            try self.validate(self.userTokenConfigurations, name: "userTokenConfigurations", parent: name, max: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case capacityUnits = "CapacityUnits"
            case description = "Description"
            case documentMetadataConfigurationUpdates = "DocumentMetadataConfigurationUpdates"
            case id = "Id"
            case name = "Name"
            case roleArn = "RoleArn"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct UpdateQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// A new description for the block list.
        public let description: String?
        /// The identifier of the block list you want to update.
        public let id: String
        /// The identifier of the index for the block list.
        public let indexId: String
        /// A new name for the block list.
        public let name: String?
        /// The IAM (Identity and Access Management) role used to access the  block list text file in S3.
        public let roleArn: String?
        /// The S3 path where your block list text file sits in S3. If you update your block list and provide the same path to the  block list text file in S3, then Amazon Kendra reloads the file to refresh  the block list. Amazon Kendra does not automatically refresh your block list.  You need to call the UpdateQuerySuggestionsBlockList API  to refresh you block list. If you update your block list, then Amazon Kendra asynchronously refreshes  all query suggestions with the latest content in the S3 file. This  means changes might not take effect immediately.
        public let sourceS3Path: S3Path?

        @inlinable
        public init(description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil) {
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path?.validate(name: "\(name).sourceS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
        }
    }

    public struct UpdateQuerySuggestionsConfigRequest: AWSEncodableShape {
        /// Configuration information for the document fields/attributes that you want to base  query suggestions on.
        public let attributeSuggestionsConfig: AttributeSuggestionsUpdateConfig?
        ///  TRUE to include queries without user information (i.e. all queries,  irrespective of the user), otherwise FALSE to only include queries  with user information. If you pass user information to Amazon Kendra along with the queries, you can set this  flag to FALSE and instruct Amazon Kendra to only consider queries with user  information. If you set to FALSE, Amazon Kendra only considers queries searched at least  MinimumQueryCount times across MinimumNumberOfQueryingUsers  unique users for suggestions. If you set to TRUE, Amazon Kendra ignores all user information and learns  from all queries.
        public let includeQueriesWithoutUserInformation: Bool?
        ///  The identifier of the index with query suggestions you want to update.
        public let indexId: String
        /// The minimum number of unique users who must search a query in order for the query  to be eligible to suggest to your users. Increasing this number might decrease the number of suggestions. However, this  ensures a query is searched by many users and is truly popular to suggest to users. How you tune this setting depends on your specific needs.
        public let minimumNumberOfQueryingUsers: Int?
        /// The the minimum number of times a query must be searched in order to be  eligible to suggest to your users. Decreasing this number increases the number of suggestions. However, this  affects the quality of suggestions as it sets a low bar for a query to be  considered popular to suggest to users. How you tune this setting depends on your specific needs.
        public let minimumQueryCount: Int?
        /// Set the mode to ENABLED or LEARN_ONLY. By default, Amazon Kendra enables query suggestions.  LEARN_ONLY mode allows you to turn off query suggestions.  You can to update this at any time. In LEARN_ONLY mode, Amazon Kendra continues to learn from new  queries to keep suggestions up to date for when you are ready to  switch to ENABLED mode again.
        public let mode: Mode?
        /// How recent your queries are in your query log time window. The time window is the number of days from current day to past days. By default, Amazon Kendra sets this to 180.
        public let queryLogLookBackWindowInDays: Int?

        @inlinable
        public init(attributeSuggestionsConfig: AttributeSuggestionsUpdateConfig? = nil, includeQueriesWithoutUserInformation: Bool? = nil, indexId: String, minimumNumberOfQueryingUsers: Int? = nil, minimumQueryCount: Int? = nil, mode: Mode? = nil, queryLogLookBackWindowInDays: Int? = nil) {
            self.attributeSuggestionsConfig = attributeSuggestionsConfig
            self.includeQueriesWithoutUserInformation = includeQueriesWithoutUserInformation
            self.indexId = indexId
            self.minimumNumberOfQueryingUsers = minimumNumberOfQueryingUsers
            self.minimumQueryCount = minimumQueryCount
            self.mode = mode
            self.queryLogLookBackWindowInDays = queryLogLookBackWindowInDays
        }

        public func validate(name: String) throws {
            try self.attributeSuggestionsConfig?.validate(name: "\(name).attributeSuggestionsConfig")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.minimumNumberOfQueryingUsers, name: "minimumNumberOfQueryingUsers", parent: name, max: 10000)
            try self.validate(self.minimumNumberOfQueryingUsers, name: "minimumNumberOfQueryingUsers", parent: name, min: 1)
            try self.validate(self.minimumQueryCount, name: "minimumQueryCount", parent: name, max: 10000)
            try self.validate(self.minimumQueryCount, name: "minimumQueryCount", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attributeSuggestionsConfig = "AttributeSuggestionsConfig"
            case includeQueriesWithoutUserInformation = "IncludeQueriesWithoutUserInformation"
            case indexId = "IndexId"
            case minimumNumberOfQueryingUsers = "MinimumNumberOfQueryingUsers"
            case minimumQueryCount = "MinimumQueryCount"
            case mode = "Mode"
            case queryLogLookBackWindowInDays = "QueryLogLookBackWindowInDays"
        }
    }

    public struct UpdateThesaurusRequest: AWSEncodableShape {
        /// A new description for the thesaurus.
        public let description: String?
        /// The identifier of the thesaurus you want to update.
        public let id: String
        /// The identifier of the index for the thesaurus.
        public let indexId: String
        /// A new name for the thesaurus.
        public let name: String?
        /// An IAM role that gives Amazon Kendra permissions to  access thesaurus file specified in SourceS3Path.
        public let roleArn: String?
        public let sourceS3Path: S3Path?

        @inlinable
        public init(description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil) {
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path?.validate(name: "\(name).sourceS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
        }
    }

    public struct Urls: AWSEncodableShape & AWSDecodableShape {
        /// Configuration of the seed or starting point URLs of the websites you want to crawl. You can choose to crawl only the website host names, or the website host names with subdomains, or the website host names with subdomains and other domains that the web pages link to. You can list up to 100 seed URLs.
        public let seedUrlConfiguration: SeedUrlConfiguration?
        /// Configuration of the sitemap URLs of the websites you want to crawl. Only URLs belonging to the same website host names are crawled. You can list up to three sitemap URLs.
        public let siteMapsConfiguration: SiteMapsConfiguration?

        @inlinable
        public init(seedUrlConfiguration: SeedUrlConfiguration? = nil, siteMapsConfiguration: SiteMapsConfiguration? = nil) {
            self.seedUrlConfiguration = seedUrlConfiguration
            self.siteMapsConfiguration = siteMapsConfiguration
        }

        public func validate(name: String) throws {
            try self.seedUrlConfiguration?.validate(name: "\(name).seedUrlConfiguration")
            try self.siteMapsConfiguration?.validate(name: "\(name).siteMapsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case seedUrlConfiguration = "SeedUrlConfiguration"
            case siteMapsConfiguration = "SiteMapsConfiguration"
        }
    }

    public struct UserContext: AWSEncodableShape {
        /// The list of data source groups you want to filter search results based on groups' access to documents in that data source.
        public let dataSourceGroups: [DataSourceGroup]?
        /// The list of groups you want to filter search results based on the groups' access to documents.
        public let groups: [String]?
        /// The user context token for filtering search results for a user. It must be a JWT or a JSON token.
        public let token: String?
        /// The identifier of the user you want to filter search results based on their access to documents.
        public let userId: String?

        @inlinable
        public init(dataSourceGroups: [DataSourceGroup]? = nil, groups: [String]? = nil, token: String? = nil, userId: String? = nil) {
            self.dataSourceGroups = dataSourceGroups
            self.groups = groups
            self.token = token
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.dataSourceGroups?.forEach {
                try $0.validate(name: "\(name).dataSourceGroups[]")
            }
            try self.validate(self.dataSourceGroups, name: "dataSourceGroups", parent: name, max: 2048)
            try self.validate(self.dataSourceGroups, name: "dataSourceGroups", parent: name, min: 1)
            try self.groups?.forEach {
                try validate($0, name: "groups[]", parent: name, max: 200)
                try validate($0, name: "groups[]", parent: name, min: 1)
                try validate($0, name: "groups[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.groups, name: "groups", parent: name, max: 2048)
            try self.validate(self.groups, name: "groups", parent: name, min: 1)
            try self.validate(self.token, name: "token", parent: name, max: 100000)
            try self.validate(self.token, name: "token", parent: name, min: 1)
            try self.validate(self.token, name: "token", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.userId, name: "userId", parent: name, max: 200)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceGroups = "DataSourceGroups"
            case groups = "Groups"
            case token = "Token"
            case userId = "UserId"
        }
    }

    public struct UserGroupResolutionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identity store provider (mode) you want to use to get users and groups. IAM Identity Center is currently the only available mode. Your users and groups must exist in an IAM Identity Center identity source in order to use this mode.
        public let userGroupResolutionMode: UserGroupResolutionMode

        @inlinable
        public init(userGroupResolutionMode: UserGroupResolutionMode) {
            self.userGroupResolutionMode = userGroupResolutionMode
        }

        private enum CodingKeys: String, CodingKey {
            case userGroupResolutionMode = "UserGroupResolutionMode"
        }
    }

    public struct UserIdentityConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The IAM Identity Center field name that contains the identifiers of your users,  such as their emails. This is used for user context filtering  and for granting access to your Amazon Kendra experience. You must set up IAM Identity Center  with Amazon Kendra. You must include your users and groups in your Access Control List when  you ingest documents into your index. For more information, see  Getting  started with an IAM Identity Center identity source.
        public let identityAttributeName: String?

        @inlinable
        public init(identityAttributeName: String? = nil) {
            self.identityAttributeName = identityAttributeName
        }

        public func validate(name: String) throws {
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, max: 1000)
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, min: 1)
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityAttributeName = "IdentityAttributeName"
        }
    }

    public struct UserTokenConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Information about the JSON token type configuration.
        public let jsonTokenTypeConfiguration: JsonTokenTypeConfiguration?
        /// Information about the JWT token type configuration.
        public let jwtTokenTypeConfiguration: JwtTokenTypeConfiguration?

        @inlinable
        public init(jsonTokenTypeConfiguration: JsonTokenTypeConfiguration? = nil, jwtTokenTypeConfiguration: JwtTokenTypeConfiguration? = nil) {
            self.jsonTokenTypeConfiguration = jsonTokenTypeConfiguration
            self.jwtTokenTypeConfiguration = jwtTokenTypeConfiguration
        }

        public func validate(name: String) throws {
            try self.jsonTokenTypeConfiguration?.validate(name: "\(name).jsonTokenTypeConfiguration")
            try self.jwtTokenTypeConfiguration?.validate(name: "\(name).jwtTokenTypeConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case jsonTokenTypeConfiguration = "JsonTokenTypeConfiguration"
            case jwtTokenTypeConfiguration = "JwtTokenTypeConfiguration"
        }
    }

    public struct Warning: AWSDecodableShape {
        /// The code used to show the type of warning for the query.
        public let code: WarningCode?
        /// The message that explains the problem with the query.
        public let message: String?

        @inlinable
        public init(code: WarningCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct WebCrawlerConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information required to connect to websites using authentication. You can connect to websites using basic authentication of user name and password. You use a secret in Secrets Manager to store your authentication credentials. You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS.
        public let authenticationConfiguration: AuthenticationConfiguration?
        /// The 'depth' or number of levels from the seed level to crawl. For example, the seed  URL page is depth 1 and any hyperlinks on this page that are also crawled are depth 2.
        public let crawlDepth: Int?
        /// The maximum size (in MB) of a web page or attachment to crawl. Files larger than this size (in MB) are skipped/not crawled. The default maximum size of a web page or attachment is set to 50 MB.
        public let maxContentSizePerPageInMegaBytes: Float?
        /// The maximum number of URLs on a web page to include when crawling a website. This number is per web page. As a website’s web pages are crawled, any URLs the web pages link to are also crawled. URLs on a web page are crawled in order of appearance. The default maximum links per page is 100.
        public let maxLinksPerPage: Int?
        /// The maximum number of URLs crawled per website host per minute. A minimum of one URL is required. The default maximum number of URLs crawled per website host per minute is 300.
        public let maxUrlsPerMinuteCrawlRate: Int?
        /// Configuration information required to connect to your internal websites via a web proxy. You must provide the website host name and port number. For example, the host name of https://a.example.com/page1.html is "a.example.com" and the port is 443, the standard port for HTTPS. Web proxy credentials are optional and you can use them to connect to a web proxy server that requires basic authentication. To store web proxy credentials, you use a secret in Secrets Manager.
        public let proxyConfiguration: ProxyConfiguration?
        /// A list of regular expression patterns to exclude certain URLs to crawl. URLs that match the patterns are excluded from the index. URLs that don't match the patterns are included in the index. If a URL matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the URL file isn't included in the index.
        public let urlExclusionPatterns: [String]?
        /// A list of regular expression patterns to include certain URLs to crawl. URLs that match the patterns are included in the index. URLs that don't match the patterns are excluded from the index. If a URL matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the URL file isn't included in the index.
        public let urlInclusionPatterns: [String]?
        /// Specifies the seed or starting point URLs of the websites or the sitemap URLs of the websites you want to crawl. You can include website subdomains. You can list up to 100 seed URLs and up to three sitemap URLs. You can only crawl websites that use the secure communication protocol, Hypertext Transfer Protocol Secure (HTTPS). If you receive an error when crawling a website, it could be that the website is blocked from crawling.  When selecting websites to index, you must adhere to the Amazon Acceptable Use Policy and all other Amazon terms. Remember that you must only use Amazon Kendra Web Crawler to index your own web pages, or web pages that you have authorization to index.
        public let urls: Urls

        @inlinable
        public init(authenticationConfiguration: AuthenticationConfiguration? = nil, crawlDepth: Int? = nil, maxContentSizePerPageInMegaBytes: Float? = nil, maxLinksPerPage: Int? = nil, maxUrlsPerMinuteCrawlRate: Int? = nil, proxyConfiguration: ProxyConfiguration? = nil, urlExclusionPatterns: [String]? = nil, urlInclusionPatterns: [String]? = nil, urls: Urls) {
            self.authenticationConfiguration = authenticationConfiguration
            self.crawlDepth = crawlDepth
            self.maxContentSizePerPageInMegaBytes = maxContentSizePerPageInMegaBytes
            self.maxLinksPerPage = maxLinksPerPage
            self.maxUrlsPerMinuteCrawlRate = maxUrlsPerMinuteCrawlRate
            self.proxyConfiguration = proxyConfiguration
            self.urlExclusionPatterns = urlExclusionPatterns
            self.urlInclusionPatterns = urlInclusionPatterns
            self.urls = urls
        }

        public func validate(name: String) throws {
            try self.authenticationConfiguration?.validate(name: "\(name).authenticationConfiguration")
            try self.validate(self.crawlDepth, name: "crawlDepth", parent: name, max: 10)
            try self.validate(self.crawlDepth, name: "crawlDepth", parent: name, min: 0)
            try self.validate(self.maxContentSizePerPageInMegaBytes, name: "maxContentSizePerPageInMegaBytes", parent: name, max: 50.0)
            try self.validate(self.maxContentSizePerPageInMegaBytes, name: "maxContentSizePerPageInMegaBytes", parent: name, min: 1e-06)
            try self.validate(self.maxLinksPerPage, name: "maxLinksPerPage", parent: name, max: 1000)
            try self.validate(self.maxLinksPerPage, name: "maxLinksPerPage", parent: name, min: 1)
            try self.validate(self.maxUrlsPerMinuteCrawlRate, name: "maxUrlsPerMinuteCrawlRate", parent: name, max: 300)
            try self.validate(self.maxUrlsPerMinuteCrawlRate, name: "maxUrlsPerMinuteCrawlRate", parent: name, min: 1)
            try self.proxyConfiguration?.validate(name: "\(name).proxyConfiguration")
            try self.urlExclusionPatterns?.forEach {
                try validate($0, name: "urlExclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "urlExclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.urlExclusionPatterns, name: "urlExclusionPatterns", parent: name, max: 250)
            try self.urlInclusionPatterns?.forEach {
                try validate($0, name: "urlInclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "urlInclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.urlInclusionPatterns, name: "urlInclusionPatterns", parent: name, max: 250)
            try self.urls.validate(name: "\(name).urls")
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationConfiguration = "AuthenticationConfiguration"
            case crawlDepth = "CrawlDepth"
            case maxContentSizePerPageInMegaBytes = "MaxContentSizePerPageInMegaBytes"
            case maxLinksPerPage = "MaxLinksPerPage"
            case maxUrlsPerMinuteCrawlRate = "MaxUrlsPerMinuteCrawlRate"
            case proxyConfiguration = "ProxyConfiguration"
            case urlExclusionPatterns = "UrlExclusionPatterns"
            case urlInclusionPatterns = "UrlInclusionPatterns"
            case urls = "Urls"
        }
    }

    public struct WorkDocsConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to include comments on documents  in your index. Including comments in your index means each comment  is a document that can be searched on. The default is set to FALSE.
        public let crawlComments: Bool?
        /// A list of regular expression patterns to exclude certain files  in your Amazon WorkDocs site repository. Files that match the patterns  are excluded from the index. Files that don’t match the patterns  are included in the index. If a file matches both an inclusion and exclusion  pattern, the exclusion pattern takes precedence and the file isn't included  in the index.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that  map Amazon WorkDocs data source attributes or field names to Amazon Kendra  index field names. To create custom fields, use the  UpdateIndex API before you map to Amazon WorkDocs fields.  For more information, see Mapping  data source fields. The Amazon WorkDocs data source field names  must exist in your Amazon WorkDocs custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain files  in your Amazon WorkDocs site repository. Files that match the patterns  are included in the index. Files that don't match the patterns are  excluded from the index. If a file matches both an inclusion and exclusion  pattern, the exclusion pattern takes precedence and the file isn't included  in the index.
        public let inclusionPatterns: [String]?
        /// The identifier of the directory corresponding to your  Amazon WorkDocs site repository. You can find the organization ID in the  Directory Service by going to  Active Directory, then  Directories. Your Amazon WorkDocs site directory has an  ID, which is the organization ID. You can also set up a new Amazon WorkDocs  directory in the Directory Service console and enable a Amazon WorkDocs site  for the directory in the Amazon WorkDocs console.
        public let organizationId: String
        ///  TRUE to use the Amazon WorkDocs change log to determine  which documents require updating in the index. Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to  scan all of your documents in Amazon WorkDocs.
        public let useChangeLog: Bool?

        @inlinable
        public init(crawlComments: Bool? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, organizationId: String, useChangeLog: Bool? = nil) {
            self.crawlComments = crawlComments
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.organizationId = organizationId
            self.useChangeLog = useChangeLog
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 250)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 300)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 250)
            try self.validate(self.organizationId, name: "organizationId", parent: name, max: 12)
            try self.validate(self.organizationId, name: "organizationId", parent: name, min: 12)
            try self.validate(self.organizationId, name: "organizationId", parent: name, pattern: "^d-[0-9a-fA-F]{10}$")
        }

        private enum CodingKeys: String, CodingKey {
            case crawlComments = "CrawlComments"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case organizationId = "OrganizationId"
            case useChangeLog = "UseChangeLog"
        }
    }
}

// MARK: - Errors

/// Error enum for Kendra
public struct KendraErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case featuredResultsConflictException = "FeaturedResultsConflictException"
        case internalServerException = "InternalServerException"
        case invalidRequestException = "InvalidRequestException"
        case resourceAlreadyExistException = "ResourceAlreadyExistException"
        case resourceInUseException = "ResourceInUseException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case resourceUnavailableException = "ResourceUnavailableException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Kendra
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You don't have sufficient access to perform this action. Please ensure you have the required permission policies and user accounts and try again.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
    public static var conflictException: Self { .init(.conflictException) }
    /// An error message with a list of conflicting queries used across different sets  of featured results. This occurred with the request for a new featured results set. Check that the queries you specified for featured results are unique per featured  results set for each index.
    public static var featuredResultsConflictException: Self { .init(.featuredResultsConflictException) }
    /// An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes and try again, or contact Support for help.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The input to the request is not valid. Please provide the correct input and try again.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// The resource you want to use already exists. Please check you have provided the correct resource and try again.
    public static var resourceAlreadyExistException: Self { .init(.resourceAlreadyExistException) }
    /// The resource you want to use is currently in use. Please check you have provided the correct resource and try again.
    public static var resourceInUseException: Self { .init(.resourceInUseException) }
    /// The resource you want to use doesn’t exist. Please check you have provided the correct resource and try again.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The resource you want to use isn't available. Please check you have provided the correct resource and try again.
    public static var resourceUnavailableException: Self { .init(.resourceUnavailableException) }
    /// You have exceeded the set limits for your Amazon Kendra service. Please see Quotas for  more information, or contact Support to inquire about an increase of limits.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The request was denied due to request throttling. Please reduce the number of requests and try again.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct input and try again.
    public static var validationException: Self { .init(.validationException) }
}

extension KendraErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "FeaturedResultsConflictException": Kendra.FeaturedResultsConflictException.self
    ]
}

extension KendraErrorType: Equatable {
    public static func == (lhs: KendraErrorType, rhs: KendraErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension KendraErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
